NMath Reference Guide

## PLS |

Class PLS2NipalsAlgorithm encapsulates the Nonlinear Iterative PArtial Least
Squares (NIPALS) algorithm for computing partial least squares regression
components.

Inheritance Hierarchy

Syntax

The PLS2NipalsAlgorithm type exposes the following members.

Constructors

Name | Description | |
---|---|---|

PLS2NipalsAlgorithm | Constructs a PLS2NipalsAlgorithm instance; |

Properties

Name | Description | |
---|---|---|

Coefficients |
Gets the regression coefficients matrix, B, for the PLS2 calculation.
B satisifies the relationship
C# ResponseVector = XB + E. (Overrides IPLS2CalcCoefficients) | |

IsGood |
Whether the most recent calculation was successful.
(Overrides IPLS2CalcIsGood) | |

MaxIterations | Gets or sets the maximum number of iterations. | |

Message |
Gets any message that may have been generated by the algorithm. For example,
if the calculation is unsuccessful, the message indicates the reason.
(Overrides IPLS2CalcMessage) | |

PredictorLoadings |
Gets the loadings matrix for PredictorMatrix.
(Overrides IPLS2CalcPredictorLoadings) | |

PredictorMean | Gets the vector of means for the predictor variables. | |

PredictorResiduals | Gets the predictor residuals matrix. | |

PredictorScores |
Gets the scores matrix for PredictorMatrix.
(Overrides IPLS2CalcPredictorScores) | |

PredictorWeights | Gets the matrix of weights for the predictors. | |

ResponseLoadings | Gets the response loadings matrix. | |

ResponseMean | Gets the vector of means for the response variables. | |

ResponseResiduals | Gets the response residuals matrix. | |

ResponseScores | Gets the response scores matrix. | |

ResponseWeights | Gets the matrix of weights for the responses. |

Methods

Name | Description | |
---|---|---|

Calculate |
Calculates the PLS2 for the given predictor and response matrices
and the given number of components.
(Overrides IPLS2CalcCalculate(DoubleMatrix, DoubleMatrix, Int32)) | |

Clone |
Creates a deep copy of this PLS2NipalsAlgorithm.
(Overrides IPLS2CalcClone) | |

HotellingsT2 |
Calculaties Hotelling's T2 statistic for each sample. T2 can be viewed as the
squared distance from a samples projection into the subspace to the centroid
of the subspace, or, more simply, the variation of the sample point within
the model.
(Inherited from IPLS2Calc) | |

Predict(DoubleMatrix) |
Predicts the responses for a set of predictor values.
(Overrides IPLS2CalcPredict(DoubleMatrix)) | |

Predict(DoubleVector) |
Predicts the response for the given predictor value.
(Overrides IPLS2CalcPredict(DoubleVector)) | |

QResiduals |
Calculates the Q residuals for in sample in the model. The Q residual
for a given sample is the distance between the sample and its projection
in the subspace of the model.
(Inherited from IPLS2Calc) |

Remarks

During the calculation the following model for PredictorMatrix (independent
variable values) is is formed:
where g is the number of components specified for the model.
T is called the scores matrix (the columns of T
are the scores), and P is called the loadings matrix. The
matrix Xg is called the residual matrix for PredictorMatrix.
A corresponding model for ResponseMatrix (dependent variable values) is
formed:
U is the scores matrix for ResponseMatrix, Q the loading
matrix for ResponseMatrix, and Yg is the residual matrix for
ResponseMatrix.

C#

PredictorMatrix = TP' + Xg

C#

ResponseMatrix = UQ' + Yg

See Also