Module lm

Module lm 

Source
Expand description

Levenberg-Marquardt least-squares optimizer.

Minimizes χ² = Σᵢ [(y_obs - y_model)² / σᵢ²] by iteratively solving:

(JᵀWJ + λ·diag(JᵀWJ)) · δ = JᵀW·r

where J is the Jacobian, W = diag(1/σ²), r = y_obs - y_model, and λ is the damping parameter.

§SAMMY Reference

  • fit/ module, manual Sec 4 (Bayes equations / generalized least-squares)

Structs§

FlatMatrix
Row-major flat matrix for cache-friendly storage.
LmConfig
Configuration for the LM optimizer.
LmResult
Result of a Levenberg-Marquardt fit.

Traits§

FitModel
A model function that can be fitted.

Functions§

levenberg_marquardt
Run the Levenberg-Marquardt optimizer.