mescla.emma.diagnostics.hooper_diagnostics¶
- mescla.emma.diagnostics.hooper_diagnostics(observed, fitted, species=None, rrmse_ok=0.1, rrmse_poor=0.25, bias_ok=0.05)[source]¶
Per-species relative bias and relative RMSE of a mixing model.
\[\mathrm{bias}_j = \frac{\overline{\hat{x}_j - x_j}}{\overline{x_j}}, \qquad \mathrm{RRMSE}_j = \frac{\sqrt{\overline{(\hat{x}_j - x_j)^2}}}{\overline{x_j}}\]Normalising by the mean observed concentration makes species of wildly different magnitude comparable – the point of the exercise.
- Parameters:
observed (array_like, DataFrame or ChemTable) – Measured concentrations.
fitted (ndarray) – Concentrations predicted by the mixing model, same shape and units.
rrmse_ok (float) – Thresholds for the verdict column. The defaults are pragmatic, not canonical: Hooper gives no universal cut-off, because what counts as a good fit depends on the analytical precision of each species. Override them with your own laboratory’s precision when you have it.
rrmse_poor (float) – Thresholds for the verdict column. The defaults are pragmatic, not canonical: Hooper gives no universal cut-off, because what counts as a good fit depends on the analytical precision of each species. Override them with your own laboratory’s precision when you have it.
bias_ok (float) – Thresholds for the verdict column. The defaults are pragmatic, not canonical: Hooper gives no universal cut-off, because what counts as a good fit depends on the analytical precision of each species. Override them with your own laboratory’s precision when you have it.
- Returns:
DiagnosticsReport
- Return type: