MultipleLinearRegressionAnalysis Class 
Namespace: Accord.Statistics.Analysis
[SerializableAttribute] public class MultipleLinearRegressionAnalysis : TransformBase<double[], double>, IRegressionAnalysis, IMultivariateAnalysis, IAnalysis, IAnova, ISupervisedLearning<MultipleLinearRegression, double[], double>
The MultipleLinearRegressionAnalysis type exposes the following members.
Name  Description  

MultipleLinearRegressionAnalysis(Boolean) 
Constructs a Multiple Linear Regression Analysis.
 
MultipleLinearRegressionAnalysis(Double, Double, Boolean)  Obsolete.
Constructs a Multiple Linear Regression Analysis.
 
MultipleLinearRegressionAnalysis(Double, Double, String, String, Boolean)  Obsolete.
Constructs a Multiple Linear Regression Analysis.

Name  Description  

Array  Obsolete.
Source data used in the analysis.
 
ChiSquareTest 
Gets a ChiSquare Test between the expected outputs and the results.
 
Coefficients 
Gets the collection of coefficients of the model.
 
CoefficientValues 
Gets the value of each coefficient.
 
Confidences 
Gets the Confidence Intervals (C.I.)
for each coefficient found in the regression.
 
FTest 
Gets a FTest between the expected outputs and results.
 
InformationMatrix 
Gets the information matrix obtained during learning.
 
Inputs 
Gets or sets the name of the input variables for the model.
 
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.)  
NumberOfSamples 
Gets the number of samples used to compute the analysis.
 
OrdinaryLeastSquares 
Gets or sets the learning algorithm used to learn the MultipleLinearRegression.
 
Output 
Gets or sets the name of the output variable for the model.
 
Outputs  Obsolete.
Gets the dependent variable value
for each of the source input points.
 
Regression 
Gets the Regression model created
and evaluated by this analysis.
 
Results  Obsolete.
Gets the resulting values obtained
by the linear regression model.
 
RSquareAdjusted 
Gets the adjusted coefficient of determination, as known as R² adjusted
 
RSquared 
Gets the coefficient of determination, as known as R²
 
Source  Obsolete.
Source data used in the analysis.
 
StandardError 
Gets the standard deviation of the errors.
 
StandardErrors 
Gets the Standard Error for each coefficient
found during the logistic regression.
 
Table 
Gets the ANOVA table for the analysis.
 
Token 
Gets or sets a cancellation token that can be used to
stop the learning algorithm while it is running.
 
ZTest 
Gets a ZTest between the expected outputs and the results.

Name  Description  

Compute  Obsolete.
Computes the Multiple Linear Regression Analysis.
 
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.)  
GetConfidenceInterval 
Gets the confidence interval for a given input.
 
GetHashCode  Serves as the default hash function. (Inherited from Object.)  
GetPredictionInterval 
Gets the prediction interval for a given input.
 
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 a set of input vectors,
producing an associated set of output vectors.
(Inherited from TransformBaseTInput, TOutput.)  
Transform(Double) 
Applies the transformation to an input, producing an associated output.
(Overrides TransformBaseTInput, TOutputTransform(TInput).)  
Transform(TInput, TOutput) 
Applies the transformation to an input, producing an associated output.
(Inherited from TransformBaseTInput, TOutput.) 
Name  Description  

HasMethod 
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)  
IsEqual  Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices. (Defined by Matrix.)  
ToT 
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.) 
Linear regression is an approach to model the relationship between a single scalar dependent variable y and one or more explanatory variables x. This class uses a MultipleLinearRegression to extract information about a given problem, such as confidence intervals, hypothesis tests and performance measures.
This class can also be bound to standard controls such as the DataGridView by setting their DataSource property to the analysis' Coefficients property.
References:
// And also extract other useful information, such // as the linear coefficients' values and std errors: double[] coef = mlra.CoefficientValues; double[] stde = mlra.StandardErrors; // Coefficients of performance, such as r² double rsquared = mlra.RSquared; // 0.62879 // Hypothesis tests for the whole model ZTest ztest = mlra.ZTest; // 0.99999 FTest ftest = mlra.FTest; // 0.01898 // and for individual coefficients TTest ttest0 = mlra.Coefficients[0].TTest; // 0.00622 TTest ttest1 = mlra.Coefficients[1].TTest; // 0.53484 // and also extract confidence intervals DoubleRange ci = mlra.Coefficients[0].Confidence; // [3.2616, 14.2193] // We can use the analysis to predict an output for a sample double y = mlra.Regression.Transform(new double[] { 10, 15 }); // We can also obtain confidence intervals for the prediction: DoubleRange pci = mlra.GetConfidenceInterval(new double[] { 10, 15 }); // and also prediction intervals for the same prediction: DoubleRange ppi = mlra.GetPredictionInterval(new double[] { 10, 15 });
// Now we can show a summary of analysis // Accord.Controls.DataGridBox.Show(regression.Coefficients);
// We can also show a summary ANOVA
DataGridBox.Show(regression.Table);
// And also extract other useful information, such // as the linear coefficients' values and std errors: double[] coef = mlra.CoefficientValues; double[] stde = mlra.StandardErrors; // Coefficients of performance, such as r² double rsquared = mlra.RSquared; // 0.62879 // Hypothesis tests for the whole model ZTest ztest = mlra.ZTest; // 0.99999 FTest ftest = mlra.FTest; // 0.01898 // and for individual coefficients TTest ttest0 = mlra.Coefficients[0].TTest; // 0.00622 TTest ttest1 = mlra.Coefficients[1].TTest; // 0.53484 // and also extract confidence intervals DoubleRange ci = mlra.Coefficients[0].Confidence; // [3.2616, 14.2193] // We can use the analysis to predict an output for a sample double y = mlra.Regression.Transform(new double[] { 10, 15 }); // We can also obtain confidence intervals for the prediction: DoubleRange pci = mlra.GetConfidenceInterval(new double[] { 10, 15 }); // and also prediction intervals for the same prediction: DoubleRange ppi = mlra.GetPredictionInterval(new double[] { 10, 15 });