Minimizer#

class jetset.minimizer.Minimizer(model)[source]#

Bases: object

Base class for concrete minimizer backends.

Notes

Provides shared residual and chi-square machinery, progress tracking, and post-fit statistics used by all optimizer implementations.

Attributes Summary

corr

Corr.

Methods Summary

fit(model[, max_ev, use_UL, use_dx, silent])

Fit.

get_chisq()

Return chisq.

residuals_Fit(p, fit_par, data, ...[, ...])

Residuals fit.

Attributes Documentation

corr#

Corr.

Returns:

Requested value.

Return type:

object

Methods Documentation

fit(model, max_ev=None, use_UL=False, use_dx=False, silent=False)[source]#

Fit.

Parameters:
  • model (object) – Model instance.

  • max_ev (int, optional) – Maximum number of optimizer function evaluations.

  • use_UL (bool, optional) – If True, enable ul.

  • use_dx (bool, optional) – If True, enable dx.

  • silent (bool, optional) – If True, suppress informational output.

get_chisq()[source]#

Return chisq.

Returns:

Requested value.

Return type:

object

residuals_Fit(p, fit_par, data, best_fit_SEDModel, loglog, chisq=False, use_UL=False, silent=False)[source]#

Residuals fit.

Parameters:
  • p (target_parameters_array) – parameter.

  • fit_par (object) – List of free fit-parameter objects.

  • data (object) – Input data table or array.

  • best_fit_SEDModel (object) – Model instance evaluated against data during fitting.

  • loglog (object) – If True, operate in log10 space.

  • chisq (bool, optional) – Chi-square value of the fit.

  • use_UL (bool, optional) – If True, enable ul.

  • silent (bool, optional) – If True, suppress informational output.

Returns:

Computed value.

Return type:

object