SPLS does not output probabilities for predicted classes.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SPLS does not output probabilities for predicted classes.

saskay
Hi,
I was using SPLS package to do multi-class classification and would require probabilities to be output for each class.
In the vignette, the documentation does say that you can output probabilities by requesting fit.type = "response", however I still only get predicted classes, rather than the respective probabilities.

library(spls)
data(prostate)
# SPLSDA with eta=0.8 & 3 hidden components
f <- splsda( prostate$x, prostate$y, K=3, eta=0.8, scale.x=FALSE )
# Prediction on the training dataset
(pred.f <- predict( f, type="fit" ))
#predict probabilities
pred.f_withprobs <- predict( f, type="fit", fit.type = "response" )