This function fits a sparse partial least squares (sPLS) model to the response variable \(Y\) using the predictor matrix \(X\). The fitted values \(\hat{Y}\) are returned.

spls.recovery(Y, X, ncomp, eta)

Arguments

Y

A numeric vector representing the response variable.

X

A numeric matrix or data frame representing the predictor variables.

ncomp

An integer specifying the number of components to include in the sPLS model.

eta

A numeric value between 0 and 1 that controls the sparsity of the PLS loadings.

Value

A numeric vector \(\hat{Y}\) containing the fitted values from the sparse PLS model.

Details

This function fits a sparse PLS model using the spls package. The sparsity level is controlled by the eta parameter, where higher values lead to sparser loadings. The number of components is specified by ncomp. The function returns the fitted values of \(Y\) from the model.

See also