Click or drag to resize
FitResult Class
Represents the result of a fit procedure.
Inheritance Hierarchy

Namespace:  Meta.Numerics.Statistics
Assembly:  Meta.Numerics (in Meta.Numerics.dll) Version: (
public class FitResult

The FitResult type exposes the following members.

Public propertyCovarianceMatrix
Gets the covariance matrix containing the variances and covariances for all fit parameters.
Public propertyDimension
Gets the number of fit parameters.
Public propertyGoodnessOfFit
Gets a test of the quality of the fit.
Public propertyParameters
Gets the best fit parameter set.
Public methodCorrelationCoefficient
Gets the coefficient of correlation between two fit parameters.
Public methodCovariance
Gets the covariance of two fit parameters.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodParameter
Get an estimate of a fit parameter.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)

All fit methods in the Meta.Numerics library return their results as an instance of the FitResult class. This includes methods that fit a sample to a distribution (e.g. FitToSample(Sample)), regression methods for bivariate and multivariate data (e.g. LinearLogisticRegression), and least-squares fits of data with error bars to a model function (e.g. FitToFunction(FuncDouble, T, Double, Double)).

A FitResult instance contains not only the parameter values, but also covariances and a goodness-of-fit test.

The vector of best-fit parameter values can be obtained as an array using the Parameters method. Individual parameter values can be obtained using the Parameter(Int32) method; this method gives not only a best-fit value but also an uncertainty by returning a UncertainValue.

The matrix of covariances can be obtained using the CovarianceMatrix method. Covariances between specific pairs of parameters van be obtained using the Covariance(Int32, Int32) method.

The goodness-of-fit test result stored in the GoodnessOfFit measures the quality of the fit. For fits to distributions, it is a Kolmogorov-Smirnov test. For regressions, it is an F-test. For fits to data with error bars, it is a chi-square test.

Fits are done using the maximum likelyhood method, with results corrected for any small-sample bias.

See Also