PartialLeastSquaresAnalysis Class 
Namespace: Accord.Statistics.Analysis
[SerializableAttribute] public class PartialLeastSquaresAnalysis : MultipleTransformBase<double[], double>, IMultivariateRegressionAnalysis, IMultivariateAnalysis, IAnalysis, IProjectionAnalysis, ISupervisedLearning<MultivariateLinearRegression, double[], double[]>
The PartialLeastSquaresAnalysis type exposes the following members.
Name  Description  

PartialLeastSquaresAnalysis(Double, Double)  Obsolete.
Constructs a new Partial Least Squares Analysis.
 
PartialLeastSquaresAnalysis(AnalysisMethod, PartialLeastSquaresAlgorithm) 
Constructs a new Partial Least Squares Analysis.
 
PartialLeastSquaresAnalysis(Double, Double, PartialLeastSquaresAlgorithm)  Obsolete.
Constructs a new Partial Least Squares Analysis.
 
PartialLeastSquaresAnalysis(Double, Double, AnalysisMethod, PartialLeastSquaresAlgorithm)  Obsolete.
Constructs a new Partial Least Squares Analysis.

Name  Description  

Algorithm 
Gets or sets the PLS algorithm used by the analysis.
 
Dependents 
Gets information about dependent (output) variables.
 
Factors 
Gets information about the factors discovered during the analysis in a
objectoriented structure which can be databound directly to many controls.
 
Importance 
Gets the Variable Importance in Projection (VIP).
 
Method 
Gets or sets the method used by this analysis.
 
NumberOfInputs 
Gets the number of inputs accepted by the model.
(Inherited from TransformBaseTInput, TOutput.)  
NumberOfOutputs 
Gets the number of outputs generated by the model.
(Inherited from TransformBaseTInput, TOutput.)  
Output  Obsolete.
Gets the dependent variables' values
for each of the source input points.
 
Overwrite 
Gets or sets whether calculations will be performed overwriting
data in the original source matrix, using less memory.
 
Predictors 
Gets information about independent (input) variables.
 
Source  Obsolete.
Source data used in the analysis.
 
Token 
Gets or sets a cancellation token that can be used to
stop the learning algorithm while it is running.
 
Weights 
Gets the Weight matrix obtained during the analysis. For the NIPALS algorithm
this is the W matrix. For the SIMPLS algorithm this is the R matrix.

Name  Description  

Adjust(Double, Double, Double, Boolean) 
Adjusts a data matrix, centering and standardizing its values
using the already computed column's means and standard deviations.
 
Adjust(Double, Double, Double, Boolean) 
Adjusts a data matrix, centering and standardizing its values
using the already computed column's means and standard deviations.
 
Compute  Obsolete.
Computes the Partial Least Squares Analysis.
 
Compute(Int32)  Obsolete.
Computes the Partial Least Squares Analysis.
 
ComputeVariableImportanceInProjection 
Computes the variable importance in projection (VIP).
 
CreateRegression 
Creates a Multivariate Linear Regression model using
coefficients obtained by the Partial Least Squares.
 
CreateRegression(Int32) 
Creates a Multivariate Linear Regression model using
coefficients obtained by the Partial Least Squares.
 
Equals  Determines whether the specified object is equal to the current object. (Inherited from Object.)  
Finalize  Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)  
GetHashCode  Serves as the default hash function. (Inherited from Object.)  
GetType  Gets the Type of the current instance. (Inherited from Object.)  
Learn 
Learns a model that can map the given inputs to the given outputs.
 
MemberwiseClone  Creates a shallow copy of the current Object. (Inherited from Object.)  
ToString  Returns a string that represents the current object. (Inherited from Object.)  
Transform(TInput) 
Applies the transformation to an input, producing an associated output.
(Inherited from MultipleTransformBaseTInput, TOutput.)  
Transform(TInput) 
Applies the transformation to a set of input vectors,
producing an associated set of output vectors.
(Inherited from MultipleTransformBaseTInput, TOutput.)  
Transform(Double)  Obsolete.
Projects a given set of inputs into latent space.
 
Transform(TInput, TOutput) 
Applies the transformation to an input, producing an associated output.
(Inherited from MultipleTransformBaseTInput, TOutput.)  
Transform(Double, Int32)  Obsolete.
Projects a given set of inputs into latent space.
 
Transform(Double, Double) 
Applies the transformation to an input, producing an associated output.
(Overrides MultipleTransformBaseTInput, TOutputTransform(TInput, TOutput).)  
TransformOutput(Double)  Obsolete.
Projects a given set of outputs into latent space.
 
TransformOutput(Double) 
Projects a given set of outputs into latent space.
 
TransformOutput(Double, Int32)  Obsolete.
Projects a given set of outputs into latent space.
 
TransformOutput(Double, Int32) 
Projects a given set of outputs into latent space.

Name  Description  

HasMethod 
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)  
ToT  Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)  
ToT  Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by Matrix.) 
Partial least squares regression (PLSregression) is a statistical method that bears some relation to principal components regression; instead of finding hyperplanes of maximum variance between the response and independent variables, it finds a linear regression model by projecting the predicted variables and the observable variables to a new space. Because both the X and Y data are projected to new spaces, the PLS family of methods are known as bilinear factor models.
References:
// References: http://www.utdallas.edu/~herve/AbdiPLSR2007pretty.pdf // Following the small example by Hervé Abdi (Hervé Abdi, Partial Least Square Regression), // we will create a simple example where the goal is to predict the subjective evaluation of // a set of 5 wines. The dependent variables that we want to predict for each wine are its // likeability, and how well it goes with meat, or dessert (as rated by a panel of experts). // The predictors are the price, the sugar, alcohol, and acidity content of each wine. // Here we will list the inputs, or characteristics we would like to use in order to infer // information from our wines. Each row denotes a different wine and lists its corresponding // observable characteristics. The inputs are usually denoted by X in the literature. inputs = new double[][] { // Wine  Price  Sugar  Alcohol  Acidity new double[] { 7, 7, 13, 7 }, new double[] { 4, 3, 14, 7 }, new double[] { 10, 5, 12, 5 }, new double[] { 16, 7, 11, 3 }, new double[] { 13, 3, 10, 3 }, }; // Here we will list our dependent variables. Dependent variables are the outputs, or what we // would like to infer or predict from our available data, given a new observation. The outputs // are usually denotes as Y in the literature. outputs = new double[][] { // Wine  Hedonic  Goes with meat  Goes with dessert new double[] { 14, 7, 8 }, new double[] { 10, 7, 6 }, new double[] { 8, 5, 5 }, new double[] { 2, 4, 7 }, new double[] { 6, 2, 4 }, }; // Next, we will create our Partial Least Squares Analysis passing the inputs (values for // predictor variables) and the associated outputs (values for dependent variables). // We will also be using the using the Covariance Matrix/Center method (data will only // be mean centered but not normalized) and the NIPALS algorithm. var pls = new PartialLeastSquaresAnalysis() { Method = AnalysisMethod.Center, Algorithm = PartialLeastSquaresAlgorithm.SIMPLS }; // Compute the analysis with all factors. The number of factors // could also have been specified in a overload of this method. var regression = pls.Learn(inputs, outputs); // After the regression has been created, we will be able to classify new instances. // For example, we will compute the outputs for the first input sample: double[] y = regression.Transform(new double[] { 7, 7, 13, 7 }); // The y output will be very close to the corresponding output used as reference. // In this case, y is a vector of length 3 with values { 14.00, 7.00, 7.75 }.