PredictPLS {sharp} | R Documentation |
Partial Least Squares predictions
Description
Computes predicted values from a Partial Least Squares (PLS) model in
regression mode applied on xdata
. This function is using the algorithm
implemented in predict.pls
.
Usage
PredictPLS(xdata, model)
Arguments
xdata |
matrix of predictors with observations as rows and variables as columns. |
model |
output of |
Value
An array of predicted values.
See Also
Examples
if (requireNamespace("mixOmics", quietly = TRUE)) {
# Data simulation
set.seed(1)
simul <- SimulateRegression(n = 100, pk = c(5, 5, 5), family = "gaussian")
x <- simul$xdata
y <- simul$ydata
# PLS
mypls <- PLS(xdata = x, ydata = y, ncomp = 3)
# Predicted values
predicted <- PredictPLS(xdata = x, model = mypls)
}
[Package sharp version 1.4.6 Index]