predict.plsda: Fonction predict.plsda

Description Usage Arguments Value Examples

View source: R/predict.plsda.R

Description

This function takes a plsda model and a set of predictors fitting to this model and will return a plsda-prev object containing the predicted values.

Usage

1
2
## S3 method for class 'plsda'
predict(object, X, ...)

Arguments

object

A plsda object containing a trained model. The model can be generated with the fit function of this package.

X

The set of predictor that will be used to compute prediction. It mus fit the predictors used to train the model.

...

Use to comply generic model

Value

A plsda-pred object containing prediction. This object contains y.hat, a qualitative prediction and Y.hat, a binarized prediction.

Examples

1
2
model <- fit(Species ~ ., data = iris)
predict(model, iris[,1:4])

Dampeel/plsda documentation built on May 23, 2019, 8:19 p.m.