Click or drag to resize

Multivariate.MultiLinearRegression Method (IReadOnlyList<Double>, IReadOnlyList<IReadOnlyList<Double>>)

Performs a multivariate linear regression on the listed columns.

Namespace:  Meta.Numerics.Statistics
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.1.4
Syntax
public static MultiLinearRegressionResult MultiLinearRegression(
	IReadOnlyList<double> yColumn,
	IReadOnlyList<IReadOnlyList<double>> xColumns
)

Parameters

yColumn
Type: System.Collections.Generic.IReadOnlyList<Double>
A column of dependent variable observations to be predicted.
xColumns
Type: System.Collections.Generic.IReadOnlyList<IReadOnlyList<Double>>
A list of columns of independent variable observations that serve as inputs to the regression function.

Return Value

Type: MultiLinearRegressionResult
A multi-linear fit.
Exceptions
ExceptionCondition
NullReferenceExceptionyColumn is null, or xColumns is null, or one of the x-columns in the list is null.
DimensionMismatchExceptionNot all of the columns contain the same number of observations.
InsufficientDataExceptionThere are too few observations to perform the fit.
Remarks

Note that the xColumns argument is column-oriented, i.e. it is a list of columns, not row-oriented, i.e. a list of rows. Either of these would match the method signature, but only column-oriented inputs will produce correct results.

See Also