PLS2Regression Type

PLSRegression contains static methods for doing partial least squares regression analysis and prediction of the data.

Constructors

Constructor Description

PLS2Regression()

Full Usage: PLS2Regression()

Instance members

Instance member Description

this.CalibrationModel

Full Usage: this.CalibrationModel

Returns: IPLS2CalibrationModel

Returns: IPLS2CalibrationModel

this.GetPRESSFromPreprocessed

Full Usage: this.GetPRESSFromPreprocessed

Parameters:
Returns: IROVector<float>
Modifiers: abstract

matrixX : IROMatrix<float>
Returns: IROVector<float>

this.InternalCalibrationModel

Full Usage: this.InternalCalibrationModel

Returns: MultivariateCalibrationModel
Modifiers: abstract

Returns: MultivariateCalibrationModel

this.PRESS

Full Usage: this.PRESS

Returns: IROVector<float>

Returns: IROVector<float>

this.PredictedYAndSpectralResidualsFromPreprocessed

Full Usage: this.PredictedYAndSpectralResidualsFromPreprocessed

Parameters:
    XU : IROMatrix<float> - Matrix of unknown spectra (preprocessed the same way as the calibration spectra).
    numFactors : int - Number of factors used for prediction.
    predictedY : IMatrix<float> - On return, holds the predicted y values. (They are centered).
    spectralResiduals : IMatrix<float> - On return, holds the spectral residual values.

Modifiers: abstract

This predicts concentrations of unknown spectra.

XU : IROMatrix<float>

Matrix of unknown spectra (preprocessed the same way as the calibration spectra).

numFactors : int

Number of factors used for prediction.

predictedY : IMatrix<float>

On return, holds the predicted y values. (They are centered).

spectralResiduals : IMatrix<float>

On return, holds the spectral residual values.

this.Reset

Full Usage: this.Reset

Modifiers: abstract

this.SetCalibrationModel

Full Usage: this.SetCalibrationModel

Parameters:
Modifiers: abstract

calib : IMultivariateCalibrationModel

Static members

Static member Description

PLS2Regression.CalculateXLeverageFromPreprocessed(matrixX, W, numFactors, leverage, leverageColumn)

Full Usage: PLS2Regression.CalculateXLeverageFromPreprocessed(matrixX, W, numFactors, leverage, leverageColumn)

Parameters:

matrixX : IROMatrix<float>
W : IROMatrix<float>
numFactors : int
leverage : IMatrix<float>
leverageColumn : int

PLS2Regression.CreateFromPreprocessed(matrixX, matrixY, maxFactors)

Full Usage: PLS2Regression.CreateFromPreprocessed(matrixX, matrixY, maxFactors)

Parameters:
    matrixX : IROMatrix<float> - The spectral matrix (each spectrum is a row in the matrix). They must at least be centered.
    matrixY : IROMatrix<float> - The matrix of concentrations (each experiment is a row in the matrix). They must at least be centered.
    maxFactors : int - Maximum number of factors for analysis.

Returns: PLS2Regression A regression object, which holds all the loads and weights neccessary for further calculations.

Creates an analyis from preprocessed spectra and preprocessed concentrations.

matrixX : IROMatrix<float>

The spectral matrix (each spectrum is a row in the matrix). They must at least be centered.

matrixY : IROMatrix<float>

The matrix of concentrations (each experiment is a row in the matrix). They must at least be centered.

maxFactors : int

Maximum number of factors for analysis.

Returns: PLS2Regression

A regression object, which holds all the loads and weights neccessary for further calculations.

PLS2Regression.ExecuteAnalysis(_X, _Y, numFactors, xLoads, yLoads, W, V, PRESS)

Full Usage: PLS2Regression.ExecuteAnalysis(_X, _Y, numFactors, xLoads, yLoads, W, V, PRESS)

Parameters:
    _X : IROMatrix<float> - The X ("spectrum") matrix, centered and preprocessed.
    _Y : IROMatrix<float> - The Y ("concentration") matrix (centered).
    numFactors : byref<int> - Number of factors to calculate.
    xLoads : IBottomExtensibleMatrix<float> - Returns the matrix of eigenvectors of X. Should be initially empty.
    yLoads : IBottomExtensibleMatrix<float> - Returns the matrix of eigenvectors of Y. Should be initially empty.
    W : IBottomExtensibleMatrix<float> - Returns the matrix of weighting values. Should be initially empty.
    V : IRightExtensibleMatrix<float> - Returns the vector of cross products. Should be initially empty.
    PRESS : IExtensibleVector<float> - If not null, the PRESS value of each factor is stored (vertically) here.

Partial least squares (PLS) decomposition of the matrizes X and Y.

_X : IROMatrix<float>

The X ("spectrum") matrix, centered and preprocessed.

_Y : IROMatrix<float>

The Y ("concentration") matrix (centered).

numFactors : byref<int>

Number of factors to calculate.

xLoads : IBottomExtensibleMatrix<float>

Returns the matrix of eigenvectors of X. Should be initially empty.

yLoads : IBottomExtensibleMatrix<float>

Returns the matrix of eigenvectors of Y. Should be initially empty.

W : IBottomExtensibleMatrix<float>

Returns the matrix of weighting values. Should be initially empty.

V : IRightExtensibleMatrix<float>

Returns the vector of cross products. Should be initially empty.

PRESS : IExtensibleVector<float>

If not null, the PRESS value of each factor is stored (vertically) here.

PLS2Regression.GetPredictionScoreMatrix(xLoads, yLoads, W, V, numFactors, predictionScores)

Full Usage: PLS2Regression.GetPredictionScoreMatrix(xLoads, yLoads, W, V, numFactors, predictionScores)

Parameters:
    xLoads : IROMatrix<float> - Matrix of spectral loads [factors,spectral bins].
    yLoads : IROMatrix<float> - Matrix of concentration loads[factors, number of concentrations].
    W : IROMatrix<float> - Matrix of spectral weightings [factors,spectral bins].
    V : IROMatrix<float> - Cross product matrix[1,factors].
    numFactors : int - Number of factors to use to calculate the score matrix.
    predictionScores : IMatrix<float> - Output: the resulting score matrix[ spectral bins, numberOfConcentrations]

Get the prediction score matrix. To get the predictions, you have to multiply the spectras to predict by this prediction score matrix (in case of a single y-variable), this is simply the dot product.

xLoads : IROMatrix<float>

Matrix of spectral loads [factors,spectral bins].

yLoads : IROMatrix<float>

Matrix of concentration loads[factors, number of concentrations].

W : IROMatrix<float>

Matrix of spectral weightings [factors,spectral bins].

V : IROMatrix<float>

Cross product matrix[1,factors].

numFactors : int

Number of factors to use to calculate the score matrix.

predictionScores : IMatrix<float>

Output: the resulting score matrix[ spectral bins, numberOfConcentrations]

PLS2Regression.Predict(XU, xLoads, yLoads, W, V, numFactors, predictedY, spectralResiduals)

Full Usage: PLS2Regression.Predict(XU, xLoads, yLoads, W, V, numFactors, predictedY, spectralResiduals)

Parameters:

XU : IROMatrix<float>
xLoads : IROMatrix<float>
yLoads : IROMatrix<float>
W : IROMatrix<float>
V : IROMatrix<float>
numFactors : int
predictedY : IMatrix<float>
spectralResiduals : IMatrix<float>