slv.inversion.sweep.collect_metrics#
- slv.inversion.sweep.collect_metrics(post, config, swept_params=None)[source]#
Extract goodness-of-fit and flux metrics from a solved inversion.
The primary target metric is
reduced_chi2— ideally close to 1.0, which indicates the error covariances are well-specified.The
prior_conc_*andposterior_conc_*columns summarize the residualobserved concentration - modeled concentration(the model isH x + background) with its root mean square (*_rmse) and mean (*_bias, positive when the model is below the observations), in the units of the observations.R2is fips’sPosterior.r2, the R² of the enhancement:corr(obs - background, H x_hat)².- Parameters:
post (
Posterior) – The posterior the pipeline returned (run()).config (
InversionConfig) –InversionConfigused for this run.swept_params (
list[str] |None) – Config field names to capture ascfg_*columns in the output row. If None, all non-scientific fields are excluded and the rest included.
- Return type:
Flat
dictready to append as a row to the results CSV.