Expand description
Solver-agnostic forward model trait.
Unlike FitModel, which is LM-specific (evaluates
residuals + Jacobian in chi-squared space), ForwardModel exposes the
raw model prediction and parameter Jacobian. Each solver wraps this to
compute its own objective and gradient:
- LM: residuals =
(data - predict) / σ, J_lm =-jacobian / σ - KL: gradient =
Σ (1 - data/predict) · jacobian
This makes new model extensions (background, temperature, etc.) work with
both solvers automatically — implement ForwardModel once, both solvers
benefit.
Traits§
- Forward
Model - Solver-agnostic forward model.