Open GregStacey opened 3 years ago
Hi, I just had a look and regretfully that's not how it is implemented though it would be easy to do. As a workaround, you should be able to get probabilities in your example with:
object <- m3
x <- xitest
result <- ssc:::checkProb(
ssc:::predProb(object$model, x, object$pred, object$pred.pars),
ninstances = nrow(x),
object$classes
)
result
Hi Osmani, we could easily implement it though with something like the following in predict.selfTraining:
result <- checkProb( predProb(object$model, x, object$pred, object$pred.pars), ninstances = nrow(x), object$classes )
if (!probability) result <- getClass(result)
return(result) }
I'm trying to return the class probabilities as predicted by selfTraining and SVM. The code below is from the selfTraining documentation. It seems like it should be returning probability but is not. Any help?