Inference

Fitting a model to data, and sampling its posterior.

Optimizer

nyx.infer.optimizer Module

Classes

FitSummary

Basic fit information.

Optimizer

Fit any pytree of Parameters with a minimiser or least-squares solver.

Uncertainties

nyx.infer.uncertainty Module

Functions

parameter_correlation(fitted, residuals_fn, *)

Full covariance and correlation of the free parameters at fitted.

parameter_errors(fitted, residuals_fn, *[, ...])

1-sigma errors on every trainable Parameter, from the Gauss-Newton covariance.

rescale_from_errors(fitted, errs)

Rescale every trainable Parameter using its error estimate.

Classes

ParameterCorrelation

How a fit's parameters trade off against one another.

Profile Likelihood

nyx.infer.profile Module

Classes

ProfileGrid

A profile-likelihood scan: chi-squared over a grid, nuisances refitted.

Multi-Target Fits

nyx.infer.multitarget Module

Classes

MultiTargetFit

Joint fit over several targets with shared instruments.

Convergence

nyx.infer.convergence Module

Functions

record_fit(opt, model[, probes, max_steps, ...])

Step opt over model, recording the loss and the probes.

Classes

FitTrace

The path a fit took, sampled once per recorded solver step.

Posterior Sampling

nyx.infer.numpyro_bridge Module

Functions

scene_model(model, data, priors, likelihood)

A NumPyro model sampling model's unfrozen parameters.

free_parameters(model)

Shape of every unfrozen parameter: the sites scene_model() samples.

init_values(model)

Free parameter values, keyed to scene_model()'s sites.