Home > Extreme Optimization Mathematics Library for .NET > Reference > Extreme.Mathematics.Curves Namespace
Represents an algorithm that fits a nonlinear curve to data.
For a list of all members of this type, see NonlinearCurveFitter Members.
System.Object
CurveFitter
NonlinearCurveFitter
Use the NonlinearCurveFitter class to fit data to a nonlinear curve by the method of least squares. The curve, which must be of a type that inherits from NonlinearCurve, is specified by the Curve property. The data is supplied as Vector objects through the XValues and YValues properties.
The Fit method performs the actual curve fit.
This method returns the NonlinearCurve that best fits the supplied data.
The Optimizer property returns the MultidimensionalOptimizer
object that was used to find the least squares solution.
To verify that the algorithm terminated normally, you can inspect the Optimizer's
Status property, which is of type AlgorithmStatus.
A value of Normal indicates that the algorithm terminated normally.
However, it is still possible that the algorithm didn't converge to the actual best fit.
A visual inspection is always recommended.
The parameters of the fitted curve can be retrieved through the BestFitParameters property. The standard deviations associated with each parameter are available through the GetStandardDeviations method.
By default, the observations are unweighted. You can supply a weighting method in two ways. You can set the WeightFunction property to a BivariateRealFunction delegate that computes the weight for each observation. The WeightFunctions class provides predefined delegates for the most common weight functions. Alternatively, you can set the individual weights by setting the WeightVector property to a Vector that contains the weight for each individual observation.
Namespace: Extreme.Mathematics.Curves
Assembly: Extreme.Mathematics (in Extreme.Mathematics.dll)
NonlinearCurveFitter Members | Extreme.Mathematics.Curves Namespace