NMath Reference Guide

## PLS |

Class PLS1CrossValidation performs an evaluation of a PLS (Partial Least
Squares) model.

Inheritance Hierarchy

Syntax

The PLS1CrossValidation type exposes the following members.

Constructors

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

PLS1CrossValidation | Default constructor. Constructs a PLS1CrossValidation instance that uses the "leave one out" cross validation and the Nipals algorithm. LeaveOneOutSubsets | |

PLS1CrossValidation(ICrossValidationSubsets) | Constructs a PLS1CrossValidation instance which uses the given subset generator and the Nipals algorithm. | |

PLS1CrossValidation(IPLS1Calc, ICrossValidationSubsets) | Constructs a PLS1CrossValidation instance which uses the given PLS calculator and subset generator. |

Properties

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

AverageMeanSqrError | Gets the average of the mean square errors for each training/testing subsets pair. | |

Calculator | Gets and sets the PLS1 calculator to use for PLS1 calculations. | |

IsGood | Returns true if all the PLS2 calculations were successful. If one or more calculations failed, false is returned. The results may be examined to determine which calculations failed. | |

Results | Gets the results of the cross validation for each training/testing subsets pair. | |

SubsetGenerator | Gets and sets the subset generator to use to generate testing and training subsets. |

Methods

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

Clone | Creates a deep copy of this PLS1CrossValidation. | |

DoCrossValidation | Performs cross validation on the given data using the existing PLS1 calculator and subset generator. | |

DoCrossValidationPls1 | Performs cross validation on the given data using the given PLS1 calculator and number of components. |

Remarks

Evaluation consists of dividing the data into two
subsets - a training subset and a testing subset. A PLS calculation
is performed on the the training subset and the resulting model is
used to predict the values of the dependent variables in the testing
set. The mean square error between the actual and predicted dependent
values is then calculated. Usually, the data is divided up into several
training and testing subsets and calculations are done on each of these.
In this case the average mean square error over each PLS calculation
is reported (the individual mean square errors are available as well).

The subsets to use in the cross validation are specifed by providing an implementation of the ICrossValidationSubsets interface. Classes that implement this interface generate training and testing subsets from PLS data.

See Also