This is a test version of Biostars. For the public version, visit https://www.biostars.org.
fetching first column as a class attribute in arulesCBA

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

0 answers

No answers yet.

Log in to answer this question.