CurveFitter<T> Class

Serves as the base class for classes that implement curve fitting algorithms.

Definition

Namespace: Numerics.NET.Curves.Generic
Assembly: Numerics.NET.Generic (in Numerics.NET.Generic.dll) Version: 9.0.3
C#
public abstract class CurveFitter<T>
where T : Object, INumberBase<T>
Inheritance
Object  →  CurveFitter<T>
Derived

Type Parameters

T

Remarks

Use the CurveFitter class to refer to classes that implement curve fitting algorithms. This is an abstract class and cannot be instantiated. Instead, use one of the derived classes: LinearCurveFitter and NonlinearCurveFitter.

The curve 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 Curve that best fits the supplied data.

By default, the observations are unweighted. You can supply a weighting method in two ways. You can set the WeightFunction property to a function of two variables 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.

Constructors

CurveFitter<T> Constructs a new CurveFitter object.

Properties

BestFitParameters Gets the curve parameters corresponding to the best fit.
Curve Gets or sets the curve that is being fitted.
InitialGuess Gets or sets the initial value for the iteration.
Residuals Gets the residuals for the observations.
ScaleVector Gets or sets the vector used to scale the curve parameters.
StandardError Gets the standard error of the curve fit.
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.

Methods

ComputeFit Computes the solution.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Fit Calculates the least-squares fit.
GetConfidenceBandwidth(T) Gets the width of the confidence band around the best-fit curve at the specified point at the 95% confidence level.
GetConfidenceBandwidth(T, Double) Gets the width of the confidence band around the best-fit curve at the specified point.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetPredictionBandwidth(T) Gets the width of the prediction band around the best-fit curve at the specified point at the 95% confidence level.
GetPredictionBandwidth(T, Double) Gets the width of the prediction band around the best-fit curve at the specified point.
GetStandardDeviations Gets the standard deviations.
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetVarianceCovarianceMatrix Returns the variance-covariance matrix of the fit.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Scale(DenseVector<T>) Scales the components of a vector using the values from ScaleVector.
Scale(Vector<T>) Scales the components of a vector using the values from ScaleVector.
ToStringReturns a string that represents the current object.
(Inherited from Object)
Unscale(DenseVector<T>) Undoes the scaling of the components of a vector using the values from ScaleVector.
Unscale(Vector<T>) Undoes the scaling of the components of a vector using the values from ScaleVector.

See Also