parameter_errors¶
- nyx.infer.uncertainty.parameter_errors(fitted, residuals_fn, *, batch_size=8, reduced_chi2=False, rcond=None)[source]¶
1-sigma errors on every trainable Parameter, from the Gauss-Newton covariance.
- Parameters:
fitted (pytree) – Model to linearise about.
residuals_fn (callable) –
(model) -> residuals.batch_size (int, optional) – Jacobian columns per kernel launch.
reduced_chi2 (bool, optional) – Whether to apply the
(r^T r) / (m - n)factor. False assumes residuals pre-scaled by 1-sigma uncertainties, socov = pinv(J^T J).rcond (float or None, optional) – Pseudoinverse cutoff, relative to the largest singular value of
J. Defaults ton * epsof the Jacobian’s dtype; a direction below that is treated as unidentifiable and given zero error.
- Returns:
sqrt(diag(pinv(J^T J))), shaped like the trainable subset of fitted.- Return type:
pytree