Click or drag to resize

BivariateNonlinearRegression Method (IReadOnlyListDouble, IReadOnlyListDouble, FuncIReadOnlyListDouble, Double, Double, IReadOnlyListDouble)

Finds the parameterized function that best fits the data.

Namespace:  Meta.Numerics.Statistics
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: 4.1.4
public static NonlinearRegressionResult NonlinearRegression(
	this IReadOnlyList<double> y,
	IReadOnlyList<double> x,
	Func<IReadOnlyList<double>, double, double> function,
	IReadOnlyList<double> start


Type: System.Collections.GenericIReadOnlyListDouble
The abscissa values.
Type: System.Collections.GenericIReadOnlyListDouble
The ordinate values.
Type: SystemFuncIReadOnlyListDouble, Double, Double
The parameterized function.
Type: System.Collections.GenericIReadOnlyListDouble
An initial guess for the parameters.

Return Value

Type: NonlinearRegressionResult
The fit result.

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 or function or start is .
DimensionMismatchExceptionThe sizes of x and y do not match.
InsufficientDataExceptionThere are not more data points than fit parameters.
DivideByZeroExceptionThe curvature matrix is singular, indicating that the data is independent of one or more parameters, or that two or more parameters are linearly dependent.

In the returned result, the fit parameters appear in the same order as in the supplied fit function and initial guess vector.

See Also