Click or drag to resize

PLS2CrossValidation Class

Class PLS2CrossValidation performs an evaluation of a PLS (Partial Least Squares) model.
Inheritance Hierarchy

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 7.3
public class PLS2CrossValidation : ICloneable

The PLS2CrossValidation type exposes the following members.

Public methodPLS2CrossValidation
Default constructor. Constructs a PLS2CrossValidation instance that uses the "leave one out" cross validation. LeaveOneOutSubsets
Public methodPLS2CrossValidation(ICrossValidationSubsets)
Constructs a PLS2CrossValidation instance which uses the given subset generator and the Nipals algorithm.
Public methodPLS2CrossValidation(IPLS2Calc, ICrossValidationSubsets)
Constructs a PLS2CrossValidation instance which uses the given PLS calculator and subset generator.
Public propertyAverageMeanSqrError
Gets the average of the mean square errors for each training/testing subsets pair.
Public propertyCalculator
Gets and sets the PLS2 calculator to use for PLS2 calculations.
Public propertyIsGood
Whether all the PLS2 calculations were successful.
Public propertyMessage
Gets any message that may have been generated by the computation. For example, if the calculation is unsuccessful, the message indicates the reason.
Public propertyResults
Gets the results of the cross validation for each training/testing subsets pair.
Public propertySubsetGenerator
Gets and sets the subset generator to use to generate testing and training subsets.
Public methodClone
Creates a deep copy of this PLS2CrossValidation.
Public methodDoCrossValidation(DoubleMatrix, DoubleMatrix, Int32)
Perform cross validation on the given data using the existing calculator and subset generator.
Public methodDoCrossValidation(DoubleMatrix, DoubleMatrix, IPLS2Calc, Int32)
Performs cross validation on the given data using the given calculator and number of components.
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