FunctionFitter
Provides fitting of standard function shapes through arbitrary (x,y) samples.
Methods
Fit
#Fit a function of a specific kind through a set of samples, discarding poorly fitted samples between fitting rounds.
Parameters:
| samples (Point2d[]) | Samples to fit. Samples with non-finite coordinates are ignored. |
| kind (FitKind) | Kind of function to fit. |
| metric (FitMetric) | Error metric to minimise. |
| trimming (FitTrimming) | Mechanism for discarding poorly fitted samples. |
| threshold (double) | Trimming threshold, interpreted by the trimming mechanism. |
| indices (out int[]) | Indices of the samples used in the final fit, in ascending order. |
Returns: Fitted function, or null if the samples do not suffice or no fit could be computed.
Fit
#Fit a function of a specific kind through a set of samples.