Learn R Programming

resemble (version 2.2.3)

get_wapls_weights: Internal function for computing the weights of the PLS components necessary for weighted average PLS

Description

internal

Usage

get_wapls_weights(pls_model, original_x, type = "w1", new_x = NULL, pls_c)

Value

get_wapls_weights returns a vector of weights for each PLS component specified

Arguments

pls_model

either an object returned by the pls_cv function or an object as returned by the opls_get_basics function which contains a pls model.

original_x

the original spectral matrix which was used for calibrating the pls model.

type

type of weight to be computed. The only available option (for the moment) is "w1". See details on the mbl function where it is explained how "w1" is computed whitin the "wapls" regression.

new_x

a vector of a new spectral observation. When "w1" is selected, new_x must be specified.

pls_c

a vector of length 2 which contains both the minimum and maximum number of PLS components for which the weights must be computed.

Author

Leonardo Ramirez-Lopez and Antoine Stevens