The caret Package - NexTag Supports Open Source Initiatives
The caret Package - NexTag Supports Open Source Initiatives
The caret Package - NexTag Supports Open Source Initiatives
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
38 plsda<br />
Arguments<br />
x<br />
y<br />
ncomp<br />
a matrix or data frame of predictors<br />
a factor or indicator matrix for the discrete outcome. If a matrix, the entries must<br />
be either 0 or 1 and rows must add to one<br />
the number of components to include in the model<br />
... arguments to pass to plsr (codeplsda only)<br />
object<br />
newdata<br />
type<br />
an object produced by plsda<br />
a matrix or data frame of predictors<br />
either "class", "prob" or "raw" to produce the predicted class, class probabilities<br />
or the raw model scores, respectively.<br />
Details<br />
If a factor is supplied, the appropriate indicator matrix is created by plsda.<br />
A multivariate PLS model is fit to the indicator matrix using the plsr function.<br />
To predict, the softmax function is used to normalize the model output into probability-like scores.<br />
<strong>The</strong> class with the largest score is the assigned output class.<br />
Value<br />
For plsda, an object of class "plsda" and "mvr". <strong>The</strong> predict method produces either a vector,<br />
matrix or three-dimensional array, depending on the values of type of ncomp. For example, specifying<br />
more than one value of ncomp with type = "class" with produce a three dimensional<br />
array but the default specification would produce a factor vector.<br />
See Also<br />
plsr<br />
Examples<br />
data(mdrr)<br />
tmpX