Chi2fit.Fit.chi2fit

You're seeing just the function chi2fit, go back to Chi2fit.Fit module for more information.
Link to this function

chi2fit(observables, model, max \\ 100, options \\ [])

View Source

Specs

chi2fit(
  observables(),
  model(),
  iterations :: pos_integer(),
  options :: Keyword.t()
) :: chi2fit()

Fits observables to a known model.

Returns the found minimum chi-squared value, covariance matrix, gradient at the minimum, and the corresponding parameter values including error estimates. For a good fit check the following:

`chi2 per degree of freedom` - this should be about 1 or less,
`gradient` - at the minimum the gradient should be zero at all directions.

For asymmetric errors use the option model equal to linear. Rough chi-squared surfaces or if numerically unstable, use the option smoothing set to true.

Arguments

`observables` - list of measurements including errors,
`model` - `{parameters, fun}`: set of initial parameter values and a function to fit against the measurements

Options

`onstep` - call back function; it is called with a map with keys `delta`, `chi2`, and `params`,
`smoothing` - boolean value indicating whether the chi-squared is smoothened using a Gauss distribution. This
is used in case the surface is rough because of numerical instabilities to smoothen the surface,
`model` - The same values as in `chi2/3` and `chi2/4`
`grid?` - Performs a grid search: per step, tries to fit only one parameter and keeps the others fixed; selects the parameter in
a round-robin fashion
`probes` -- a list of tuples containing the result of the `chi2probe/4` function. Each tuple contains the chi2 value and parameter list.
Defaults to the empty list.