MultivariateMultiLinearRegression(IReadOnlyListDouble, IReadOnlyListIReadOnlyListDouble) Method

Performs a multivariate linear regression on the listed columns.

Definition

Namespace: Meta.Numerics.Statistics
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public static MultiLinearRegressionResult MultiLinearRegression(
	IReadOnlyList<double> yColumn,
	IReadOnlyList<IReadOnlyList<double>> xColumns
)

Parameters

yColumn  IReadOnlyListDouble
A column of dependent variable observations to be predicted.
xColumns  IReadOnlyListIReadOnlyListDouble
A list of columns of independent variable observations that serve as inputs to the regression function.

Return Value

MultiLinearRegressionResult
A multi-linear 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.

Exceptions

NullReferenceExceptionyColumn is , or xColumns is , or one of the x-columns in the list is .
DimensionMismatchExceptionNot all of the columns contain the same number of observations.
InsufficientDataExceptionThere are too few observations to perform the fit.

See Also