naginterfaces.library.correg.pls_​fit

naginterfaces.library.correg.pls_fit(nfact, p, c, w, rcond, orig, xbar, ybar, iscale, xstd, ystd, vipopt, ycv)[source]

pls_fit calculates parameter estimates for a given number of factors given the output from an orthogonal scores PLS regression (pls_svd() or pls_wold()).

For full information please refer to the NAG Library document for g02lc

https://www.nag.com/numeric/nl/nagdoc_27.1/flhtml/g02/g02lcf.html

Parameters
nfactint

, the number of factors to include in the calculation of parameter estimates.

pfloat, array-like, shape

-loadings as returned from pls_svd() and pls_wold().

cfloat, array-like, shape

-loadings as returned from pls_svd() and pls_wold().

wfloat, array-like, shape

-weights as returned from pls_svd() and pls_wold().

rcondfloat

Singular values of less than times the maximum singular value are treated as zero when calculating parameter estimates. If is negative, a value of is used.

origint

Indicates how parameter estimates are calculated.

Parameter estimates for the centred, and possibly, scaled data.

Parameter estimates for the original data.

xbarfloat, array-like, shape

If , mean values of predictor variables in the model; otherwise is not referenced.

ybarfloat, array-like, shape

If , mean value of each response variable in the model; otherwise is not referenced.

iscaleint

If , must take the value supplied to either pls_svd() or pls_wold(); otherwise is not referenced.

xstdfloat, array-like, shape

If and , the scalings of predictor variables in the model as returned from either pls_svd() or pls_wold(); otherwise is not referenced.

ystdfloat, array-like, shape

If and , the scalings of response variables as returned from either pls_svd() or pls_wold(); otherwise is not referenced.

vipoptint

A flag that determines variable influence on projections (VIP) options.

VIP are not calculated.

VIP are calculated for predictor variables using the mean explained variance in responses.

VIP are calculated for predictor variables for each response variable in the model.

Note that setting when gives the same result as setting directly.

ycvfloat, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; otherwise: .

If , is the cumulative percentage of variance of the th response variable explained by the first factors, for , for ; otherwise is not referenced.

Returns
bfloat, ndarray, shape

contains the parameter estimate for the th predictor variable in the model for the th response variable, for , for .

obfloat, ndarray, shape

If , contains the intercept value for the th response variable, and contains the parameter estimate on the original scale for the th predictor variable in the model, for , for . Otherwise is not referenced.

vipfloat, ndarray, shape

If , contains the VIP statistic for the th predictor variable in the model for all response variables, for .

If , contains the VIP statistic for the th predictor variable in the model for the th response variable, for , for .

Otherwise is not referenced.

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: or .

(errno )

On entry, .

Constraint: if , or .

(errno )

On entry, and .

Constraint: , or .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, and .

Constraint: if , .

(errno )

On entry, and .

Constraint: if , .

(errno )

On entry, and .

Constraint: if , .

Notes

The parameter estimates for a -factor orthogonal scores PLS model with predictor variables and response variables are given by,

where is the () matrix of -weights; is the matrix of -loadings; and is the matrix of -loadings for a fitted PLS model.

The parameter estimates are for centred, and possibly scaled, predictor data and response data . Parameter estimates may also be given for the predictor data and response data .

Optionally, pls_fit will calculate variable influence on projection (VIP) statistics, see Wold (1994).

References

Wold, S, 1994, PLS for multivariate linear modelling QSAR: chemometric methods in molecular design, Methods and Principles in Medicinal Chemistry, (ed van de Waterbeemd H), Verlag-Chemie