My code for the predict
function is as following:
predict(Flaw.rf, newdata = newtest[-grep("Product", colnames(newtest))],
type="prob")
When I get rid of the type="prob"
there is no problem. And if I change the product to just 2
, there is also no problem. However, when the product is multi-classes and I apply type="prob"
, there is something wrong. It says undefined columns selected