Click or drag to resize

PLS2SimplsAlgorithm Class

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
SystemObject
  CenterSpace.NMath.CoreIPLS2Calc
    CenterSpace.NMath.CorePLS2SimplsAlgorithm

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.3
Syntax
[SerializableAttribute]
public class PLS2SimplsAlgorithm : IPLS2Calc

The PLS2SimplsAlgorithm type exposes the following members.

Constructors
  NameDescription
Public methodPLS2SimplsAlgorithm
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.
Public methodPLS2SimplsAlgorithm(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.
Top
Properties
  NameDescription
Public propertyCoefficients
Gets the regression coefficients matrix, B, for the PLS2 calculation. B satisifies the relationship
ResponseVector = XB + E
where X and ResponseVector are, respectively, the centered independent and dependent variables values, and E is a noise term for the model.
(Overrides IPLS2CalcCoefficients.)
Public propertyStatic memberDefaultMaxPowerIteration
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.
Public propertyStatic memberDefaultPowerMethodTolerance
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.
Public propertyIsGood
Whether the most recent calculation was successful.
(Overrides IPLS2CalcIsGood.)
Public propertyMaxIterations
Gets and sets the maximum number of iterations to be performed when using the iterative power method to find dominant eigenvectors.
Public propertyMessage
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.)
Public propertyOrthogonalLoadings
Gets the matrix of orthogonal loadings, the basis for the predictor loadings matrix.
Public propertyPredictorLoadings
Gets the matrix of predictor loadings. The matrix of predictor loadings, P, is defined by
P = X'T
where X' is the transpose of the predictor matrix and T is the predictor score matrix.
(Overrides IPLS2CalcPredictorLoadings.)
Public propertyPredictorMean
Gets the vector of means for the predictor variables.
Public propertyPredictorScores
Gets the matrix of predictor scores.
(Overrides IPLS2CalcPredictorScores.)
Public propertyPredictorWeights
Gets the matrix of predictor weights.
Public propertyResponseLoadings
Gets the matrix of response loadings. The matrix of response loadings, Q, is defined by
Q = Y'T
where Y' is the transpose of the response matrix and T is the predictor score matrix.
Public propertyResponseMean
Gets the vector of means for the response variables.
Public propertyResponseScores
Gets the matrix of response scores.
Public propertyTolerance
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.
Top
Methods
  NameDescription
Public methodCalculate
Calculates the PLS2 for the given predictor and response matrices and the given number of components.
(Overrides IPLS2CalcCalculate(DoubleMatrix, DoubleMatrix, Int32).)
Public methodClone
Creates a deep copy of this PLS2SimplsAlgorithm.
(Overrides IPLS2CalcClone.)
Public methodHotellingsT2
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.)
Public methodPredict(DoubleMatrix)
Predicts the responses for a set of predictor values.
(Overrides IPLS2CalcPredict(DoubleMatrix).)
Public methodPredict(DoubleVector)
Predicts the response for the given predictor value.
(Overrides IPLS2CalcPredict(DoubleVector).)
Public methodQResiduals
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.)
Top
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
X = [x1, x2,..., xp]
that contains the p values of n samples, into a set of c latent variable or factor scores
T = [t1, t2,...,tc]

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

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