[R] SPLS does not output probabilities for predicted classes.
saskay
sashi1985 at gmail.com
Sun Mar 25 13:37:52 CEST 2012
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" )
--
View this message in context: http://r.789695.n4.nabble.com/SPLS-does-not-output-probabilities-for-predicted-classes-tp4503031p4503031.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list