Fit To Data

fitting.fit(func: eddington.fitting_function_class.FittingFunction, a0: <sphinx.ext.autodoc.importer._MockObject object at 0x7fb3a815c710> = None, use_x_derivative: bool = True, use_a_derivative: bool = True) → eddington.fitting_result.FittingResult

Implementation of the fitting algorithm.

This functions wraps scipy’s ODR algorithm.

Parameters:
  • data (FittingData) – Fitting data to optimize
  • func (FittingFunction) – a function to fit the data according to.
  • a0 (np.ndarray) – initial guess for the parameters
  • use_x_derivative (bool) – indicates whether to use x derivative or not.
  • use_a_derivative (bool) – indicates whether to use a derivative or not.
Returns:

FittingResult

Raises:

FittingError – Raised when missing information for the fitting algorithm.