fetching first column as a class attribute in arulesCBA
0
0
Entering edit mode
3.0 years ago

I am using arulesCBA package in r on dataset with class attribute that has 2 values. this class attribute is the first column of the transactions. I am starting with read.transactions function to extract data.

trans<-read.transactions("transactions.csv",quote="",sep=",",rm.duplicates=TRUE)

I am trying after that to identify the class column which is the first field for training model,but it doesn't fetch the first column.

className<-colnames(trans)[1]
training<-trans[1:750,]
testing<-trans[750:1000]
classifier<-CBA(training,className)
classes<-predict(classifier,testing)
arulesCBA R • 316 views
ADD COMMENT

Login before adding your answer.

Traffic: 2369 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6