naive bayes Predictor shows only one colum

Hi, I have problem with R Predictor. it shows me only the predictor colum. I have tryied with

  • print(confusionMatrix(knime.out, knime.in$target, positive = NULL, dnn = c("Prediction","True")))

but this code produce an Error:

  • "'x' must be atomic for 'sort.list'
  • Have you called 'sort' on a list?"

does have someone an idea?

'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?
'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?

Hi ramin,

I think the process would be to use first the R Learner Node with something like this:

model <- naiveBayes(Class ~ ., data = ...)

Then, use the R Predictor node to make the prediction:

pred <- predict(model, ...)

In order to visualize the confusion matrix you can use the Scorer node.

As example, I would point you to the Examples Server here: knime://EXAMPLES/07_Scripting/02_R/01_Example_of_R_Snippet

Does this help?

Best,

Vincenzo

 

 

Thank you Vincenzo

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.