scarlet2.infer

scarlet2.infer#

Inference methods

Classes

FitValidator(scene, observation)

A class containing all of the validation checks for a Scene objects after calling .fit().

Measurement(name, mean, std)

The mean and standard deviation of a measured quantity for one source.

PairSimilarity(weight[, eps])

Configuration for the pair-similarity regularizer used by fit().

Functions

fit(scene, observations, *args[, schedule, ...])

Fit model parameters of every source in scene to match observations.

get_scene_samples(scene, uncertainties[, ...])

Draw posterior sample scenes from a Laplace approximation.

hvp(f, primals, tangents)

Calculate the Hessian-vector product of a function f

hvp_grad(grad_f, primals, tangents)

Calculate the Hessian-vector product of a gradient function grad_f

hvp_rad(hvp, shape[, key, max_iter])

Approximate the diagonal of the Hessian

sample(scene, observations, *args[, seed, ...])

Sample parameters of every source in scene to get posteriors given observations.

source_uncertainty(scene, uncertainties, ...)

Propagate parameter uncertainties to a per-source measurement.

uncertainty(scene, observations[, ...])

Estimate the per-parameter curvature (diagonal Hessian) of a fitted model.