accelmo.fitting.results¶
What a fit returns.
- class accelmo.fitting.results.FitDiagnostics(converged, reason, iterations, best_loss, gradient_norm=None, damping=None, accepted_evaluations=None)[source]¶
Bases:
objectHow the optimisation ended.
iterationscounts epochs (tracking) or Levenberg-Marquardt iterations.gradient_norm,dampingandaccepted_evaluationsdescribe the last LM update and areNonefor the tracking fit.- Parameters:
converged (bool)
reason (str | None)
iterations (int)
best_loss (float)
gradient_norm (float | None)
damping (float | None)
accepted_evaluations (int | None)
- converged: bool¶
- reason: str | None¶
- iterations: int¶
- best_loss: float¶
- gradient_norm: float | None = None¶
- damping: float | None = None¶
- accepted_evaluations: int | None = None¶
- class accelmo.fitting.results.UncertaintyInfo(hessian, seconds, note='')[source]¶
Bases:
objectHow the uncertainties of a fit were computed.
- Parameters:
hessian (str)
seconds (float)
note (str)
- hessian: str¶
the Hessian that was used.
- Type:
"true"or"gauss_newton"
- seconds: float¶
Wall time of the uncertainty stage.
- note: str = ''¶
Why a requested Hessian was replaced, empty when it was not.
- class accelmo.fitting.results.FitResult(knobs, uncertainties, diagnostics=None, extra=dict(), extra_uncertainties=dict(), uncertainty=None)[source]¶
Bases:
objectFitted knobs, their 1-sigma uncertainties (by knob name) and how the fit ended.
- Parameters:
knobs (dict[str, float])
uncertainties (dict[str, float])
diagnostics (FitDiagnostics | None)
extra (dict[str, float])
extra_uncertainties (dict[str, float])
uncertainty (UncertaintyInfo | None)
- knobs: dict[str, float]¶
- uncertainties: dict[str, float]¶
- diagnostics: FitDiagnostics | None = None¶
- extra: dict[str, float]¶
Extra fitted parameters that are not model knobs (e.g. BPM and corrector gains).
- extra_uncertainties: dict[str, float]¶
1-sigma uncertainties of
extra, by the same names.
- uncertainty: UncertaintyInfo | None = None¶
Nonewhen the uncertainties were not computed or the stage failed.