NMath Reference Guide

## PLS |

Class PLS2SimplsAlgorithm encapsulates the Straightforward IMplementation
of Partial Least Squares, or SIMPLS, algorithm (de Jong, 1993) for
computing partial least squares regression components.

Inheritance Hierarchy

Syntax

The PLS2SimplsAlgorithm type exposes the following members.

Constructors

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

PLS2SimplsAlgorithm | Constructs an PLS2SimplsAlgorithm instance. The maximum number of iterations and convergence tolerance used in the power method to compute the dominant eigenvector at each iteration of the SIMPLS algorithm are set to their default values. | |

PLS2SimplsAlgorithm(Int32, Double) | Constructs an instance of the PLS2SimplsAlgorithm class with the specified values for the maximum number of iterations and tolerance to be used in the power method algorithm used for computing dominant eigenvectors. |

Properties

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

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

DefaultMaxPowerIteration | Gets and sets the default value for the maximum number of iterations to be performed when use the power method for computing dominant eigenvectors and eigenvalues needed by the SIMPLS algorithm. | |

DefaultPowerMethodTolerance | Gets and sets the default value for the tolerance used to determine convergence of the power method for computing dominant eigenvectors and eigenvalues needed by the SIMPLS algorithm. | |

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

MaxIterations | Gets and sets the maximum number of iterations to be performed when using the iterative power method to find dominant eigenvectors. | |

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) | |

OrthogonalLoadings | Gets the matrix of orthogonal loadings, the basis for the predictor loadings matrix. | |

PredictorLoadings |
Gets the matrix of predictor loadings. The matrix of predictor
loadings, P, is defined by
C# P = X'T (Overrides IPLS2CalcPredictorLoadings) | |

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

PredictorScores |
Gets the matrix of predictor scores.
(Overrides IPLS2CalcPredictorScores) | |

PredictorWeights | Gets the matrix of predictor weights. | |

ResponseLoadings |
Gets the matrix of response loadings. The matrix of response
loadings, Q, is defined by
C# Q = Y'T | |

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

ResponseScores | Gets the matrix of response scores. | |

Tolerance | Gets and sets the tolerance to be used in the iterative power method that is used to compute dominant eigenvectors. The power method converges if changes in the normalized eigenvector, with respect to the infinity norm, is less than this specified tolerance. |

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 PLS2SimplsAlgorithm.
(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

The SIMPLS is used to find a predictive linear model of the form
Y = XB, where Y is a matrix of response variables, X
is a matrix of predictor variables, and B is the matrix of regression
coefficients. This is achieved by compressing the predictor data matrix
that contains the p values of n
samples, into a set of c latent variable or factor scores

C#

X = [x1, x2,..., xp]

C#

T = [t1, t2,...,tc]

These factor scores are then used to fit a set of n observations to m response variables

C#

Y = [y1, y2,...,ym]

The relationship between the X and T is T = XR, where R is the matrix of predictor weights. Factor scores U and weights Q for the response variable Y are also computed and satisfy U = Y0Q, where Y0 is the matrix of centered response data.

The algorithm requires the computation of a dominant eigenvector at each iteration. The iterative Power Method is used to calculate this eigenvector and the maximum number of iterations and convergance tolerance may be specified for instances of this class through either through the contructor or properties.

See Also