Click or drag to resize

SparsePls Class

Class SparsePls performs a Partial Least Squares (PLS) calculation for the model X ~ Y with variable selection. The LASSO penalization is used on the pairs of loading vectors. SparsePls allows matrices with missing values in them by using the NIPALS algorithm to estimate them. Missing values are represented as Double.NaN.
Inheritance Hierarchy

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.4
public class SparsePls : IPLS2Calc

The SparsePls type exposes the following members.

Public propertyCenteredScaledX
Matrix of scaled, centered X values.
Public propertyCenteredScaledY
Matrix of scaled centered Y values.
Public propertyCMatrix
Matrix of coefficients used internally for prediction.
Public propertyCoefficients
Coefficient matrix that may be used for prediction.
(Overrides IPLS2CalcCoefficients.)
Public propertyIsGood
Indicates whether the most recent calculation was successful. For SparsePls a return value of false most likely indicates that the iterative algorithm did not converge before reaching the maximum number of iterations. Check the Message property for further information in this case.
(Overrides IPLS2CalcIsGood.)
Public propertyIterations
Number of iterations of the algorthm for each component
Public propertyKeepX
Get and sets the number of X variables kept in the model for each component.
Public propertyKeepY
Get and sets the number of Y variables kept in the model for each component.
Public propertyMaxIterations
Gets the max iterations performed by the iterative algorithm.
Public propertyMessage
Gets any message that may have been generated by the algorithm. For example, if the calculation is unsuccessful, the message should indicate the reason.
(Overrides IPLS2CalcMessage.)
Public propertyMode
Gets and sets the PLS mode.
Public propertyNumComponents
Gets the number components.
Public propertyPredictorLoadings
Gets the predictor variable loadings. This is an alias for XLoadings.
(Overrides IPLS2CalcPredictorLoadings.)
Public propertyPredictorScores
Gets the predictor variable scores. This is an alias for XVariates.
(Overrides IPLS2CalcPredictorScores.)
Public propertyTolerance
Gets the tolerance used for convergence determination of the iterative algorithm.
Public propertyXLoadings
Gets the matrix of X loadings.
Public propertyXVariates
Gets the matrix of X variates or scores.
Public propertyYLoadings
Gets the matrix of Y loadings.
Public propertyYVariates
Gets the matrix of Y variates or scores.
Public methodCalculate
Calculates the sparse PLS fit for the given data and number of components. X and Y values are first centered and scaled by their standard deviations.
(Overrides IPLS2CalcCalculate(DoubleMatrix, DoubleMatrix, Int32).)
Public methodClone
Creates a deep copy of self.
(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)
Uses the calculated model to predict the observed values from a matrix of predictor values.
(Overrides IPLS2CalcPredict(DoubleMatrix).)
Public methodPredict(DoubleVector)
Used the calculated model to predict the observed value from the given predictor vector.
(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.)
See Also