Click or drag to resize

BivariatePolynomialRegression Method

Computes the polynomial of given degree which best fits the data.

Namespace:  Meta.Numerics.Statistics
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.1.4
public static PolynomialRegressionResult PolynomialRegression(
	this IReadOnlyList<double> y,
	IReadOnlyList<double> x,
	int m


Type: System.Collections.GenericIReadOnlyListDouble
The values of the dependent variables (y-coordinates).
Type: System.Collections.GenericIReadOnlyListDouble
The values of the independent variable (x-coordinates).
Type: SystemInt32
The degree, which must be non-negative.

Return Value

Type: PolynomialRegressionResult
The result of the fit.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IReadOnlyListDouble. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
ArgumentNullExceptionx or y is .
DimensionMismatchExceptionx and y do not contain the same number of entries.
ArgumentOutOfRangeExceptionm is negative.
InsufficientDataExceptionThere are fewer data points than coefficients to be fit.
See Also