BivariateNonlinearRegression(IReadOnlyListDouble, IReadOnlyListDouble, FuncIReadOnlyDictionaryString, Double, Double, Double, IReadOnlyDictionaryString, Double) Method

Finds the parameterized function that best fits the data.

Definition

Namespace: Meta.Numerics.Statistics
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public static NonlinearRegressionResult NonlinearRegression(
	this IReadOnlyList<double> y,
	IReadOnlyList<double> x,
	Func<IReadOnlyDictionary<string, double>, double, double> function,
	IReadOnlyDictionary<string, double> start
)

Parameters

y  IReadOnlyListDouble
The abscissa values.
x  IReadOnlyListDouble
The ordinate values.
function  FuncIReadOnlyDictionaryString, Double, Double, Double
The parameterized function.
start  IReadOnlyDictionaryString, Double
An initial guess for the parameters.

Return Value

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).

Exceptions

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.

See Also