NMath Reference Guide

## Sparse |

Class for performing Discriminant Analysis (DA) using sparse Partial Least
Squares (sPLS). This is a classical sPLS regression, but where the
response variable is catagorical. The response vector Y is qualitative and
is recoded as a dummy block matrix where each of the response categories
are coded via an indicator variable. PLS-DA is then run as if Y was a
continuous matrix.

Inheritance Hierarchy

Syntax

The SparsePlsDa type exposes the following members.

Constructors

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

SparsePlsDa | Constructs a SparsePlsDa instance using default settings. | |

SparsePlsDa(Int32, Double) | Constructs a SparsePlsDa instance. The sparse PLS fit algorithm is executed using the specified maximum iterations. | |

SparsePlsDa(DoubleMatrix, Factor, Int32, Int32, Int32, Double) | Constructs a SparsePlsDa for the given data and options. |

Properties

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

Calculator |
Gets and sets the calculator.
(Inherited from PLS2) | |

CenteredScaledX | Matrix of scaled, centered X values. | |

CenteredScaledY | Matrix of scaled centered Y values. | |

CMatrix | Matrix of coefficients used internally for prediction. | |

IndicatorMatrix | Gets the indicator matrix (dummy block matrix) used in the calculation. The indicator matrix has G columns, where G is the number of classes containing ones and zeros. The gth column is one and the others zero for observations of class g. | |

IsGood |
Whether the calculation was successful.
(Inherited from PLS2) | |

KeepX | Get and sets the number of X variables kept in the model for each component. | |

Message |
Gets any message that may have been generated by the algorithm. For
example, if the calculation is unsuccessful, the message indicate the
reason.
(Inherited from PLS2) | |

NumComponents |
Gets and sets the number of predictor variable components to use
in the calculation.
(Inherited from PLS2) | |

X |
Gets the predictor matrix.
(Inherited from PLS2) | |

XLoadings | Gets the matrix of X loadings. | |

XVariates | Gets the matrix of X variates or scores. | |

Y |
Gets the response matrix.
(Inherited from PLS2) | |

YFactor | Gets the catagorical response varible used in the calculation as a Factor . | |

YLoadings | Gets the matrix of Y loadings. | |

YVariates | Gets the matrix of Y variates or scores. |

Methods

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

Calculate(DataFrame, DataFrame, Int32) |
Calculates the partial least squares fit.
(Inherited from PLS2) | |

Calculate(DoubleMatrix, DoubleMatrix, Int32) |
Calculates the partial least squares fit.
(Inherited from PLS2) | |

Calculate(DoubleMatrix, Factor, Int32, Int32) | Performs the sparse Partial Least squares calculation for the given data. | |

Clone |
Creates a deep copy of this PLS2.
(Inherited from PLS2) | |

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

Predict(DoubleMatrix) |
Predict the responses for a set of predictor values.
(Inherited from PLS2) | |

Predict(DoubleVector) |
Calculates the predicted value of the response variable
for the given value of the predictor variable.
(Inherited from PLS2) | |

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

See Also