This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in discretizeDF.supervised(formula, data, method = disc.method) :data needs to be a data.frame

I am using arulesCBA on dataset of words with class attribute which is polarity to be positive or negative. first, I am converting the words to numeric values by using as.numeric function. after that, I am discretizing the columns using this code:

   trans.disc <- as.data.frame(lapply(df[2:75], function(x) discretize(x, categories=9)))

in this step, I have warnings that say: parameter categories is deprecated. Use breaks instead! Also, the default method is now frequency!the next step that I am applying is adding the polarity column :

trans.disc$polarity <- df$polarity

the last step, I am trying to build the classifier:

classifier <- CBA(trans.disc, "polarity", supp = 0.05, conf=0.9)

in this phase, there is an error message that says: (Error in discretizeDF.supervised(formula, data, method = disc.method) :data needs to be a data.frame).

r arulescba

0 answers

No answers yet.

Log in to answer this question.