0
library(C50)
model <- C5.0(training$`Class variable`~ ., data = training[, -9])
plot(model)
pred <- predict.C5.0(model, testing[, -9])
a <- table(testing$`Class variable`, pred)

sum(diag(a))/sum(a)

here while plotting my model i am getting this error, kindly help me on this.

r2evans
  • 141,215
  • 6
  • 77
  • 149
  • You shouldn't need `training$` in the formula, just `\`Class variable` ~ .` should suffice (assuming it is in `training`). – r2evans Apr 28 '21 at 15:45
  • The error comes from here: https://github.com/topepo/C5.0/blob/master/R/as.party.C5.0.R#L252-L254. I don't know the `C50` package, unfortunately, so you should dig into what `!any(varp>0)` means and how to avoid it. – r2evans Apr 28 '21 at 15:46

0 Answers0