PLS_Toolbox Documentation: pcr | < pcolormap | pcrengine > |
pcr
Purpose
Principal components regression: multivariate inverse least squares regession.
Synopsis
model = pcr(x,y,ncomp,options) %calibration
pred = pcr(x,model,options) %prediction
valid = pcr(x,y,model,options) %validation
options = pcr('options')
Description
PCR calculates a single principal components regression model using the given number of components ncomp to predict y from measurements x.
To construct a PCR model, the inputs are x the predictor x-block (2-way array class "double" or "dataset"), y the predicted y-block (2-way array class "double" or "dataset"), ncomp the number of components to to be calculated (positive integer scalar) and the optional structure, options. The output is a standard model structure model with the following fields (see MODELSTRUCT):
To make predictions the inputs are x the new predictor x-block (2-way array class "double" or "dataset"), and model the PCR model. The output pred is a structure, similar to model, that contains scores, predictions, etc. for the new data.
If new y-block measurements are also available then the inputs are x the new predictor x-block (2-way array class "double" or "dataset"), y the new predicted block (2-way array class "double" or "dataset"), and model the PCR model. The output valid is a structure, similar to model, that contains scores, predictions, and additional y-block statistics etc. for the new data.
In prediction and validation modes, the same model structure is used but predictions are provided in the model.detail.pred field.
Note: Calling pcr with no inputs starts the graphical user interface (GUI) for this analysis method.
Options
The default options can be retreived using: options = pcr('options');.
OUTPUTVERSION
By default (options.outputversion = 3) the output of the function is a standard model structure model. If options.outputversion = 2, the output format is:
[b,ssq,t,p] = pcr(x,y,ncomp,options)
where the outputs are
Note: The regression matrices are ordered in b such that each Ny (number of y-block variables) rows correspond to the regression matrix for that particular number of principal components.
See Also
analysis, crossval, frpcr, modelstruct, pca, pls, preprocess, ridge
< pcolormap | pcrengine > |