Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Class NonlinearCurveFitter _ Inherits CurveFitter |
| C# |
|---|
public class NonlinearCurveFitter : CurveFitter |
| C++ |
|---|
public ref class NonlinearCurveFitter : public CurveFitter |
Methods
| Icon | Type | Description |
|---|---|---|
| Equals(Object) | ||
| Finalize() | ||
| Fit() |
Calculates the least-squares fit.
| |
| GetHashCode() | Serves as a hash function for a particular type. | |
| GetStandardDeviations() |
Gets the standard deviations.
| |
| GetType() | Gets the Type of the current instance. | |
| GetVarianceCovarianceMatrix() |
Gets the standard deviations.
| |
| MemberwiseClone() | Creates a shallow copy of the current Object. | |
| Scale(GeneralVector) |
Scales the components of a vector using the values from ScaleVector.
| |
| Scale(Vector) |
Scales the components of a vector using the values from ScaleVector.
| |
| ToString() | ||
| Unscale(GeneralVector) |
Undoes the scaling of the components of a vector using the values from ScaleVector.
| |
| Unscale(Vector) |
Undoes the scaling of the components of a vector using the values from ScaleVector.
|
Constructors
| Icon | Type | Description |
|---|---|---|
| NonlinearCurveFitterNew() |
Constructs a new NonlinearCurveFitter object.
|
Properties
| Icon | Type | Description |
|---|---|---|
| BestFitParameters |
Gets the curve parameters corresponding to the best fit.
| |
| Curve |
Gets the non-linear curve that is being fitted.
| |
| InitialGuess |
Gets or sets the initial value for the iteration.
| |
| Optimizer |
Gets the optimizer used to calculate the nonlinear least-squares solution.
| |
| Residuals |
Gets the residuals for the observations.
| |
| ScaleVector |
Gets or sets the Vector used to scale the curve parameters.
| |
| WeightFunction |
Gets or sets the weight function.
| |
| WeightVector |
Gets or sets the weight vector.
| |
| XValues |
Gets or sets the vector of x-values.
| |
| YValues |
Gets or sets the vector of y-values.
|
Remarks
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.
Inheritance Hierarchy
Extreme.Mathematics.Curves.CurveFitter
Extreme.Mathematics.Curves.NonlinearCurveFitter