jaxili.posterior.base_posterior module#
Base Posterior.
This module contains the base class for Neural Posteriors. Classes used to sample in NPE and NLE will inherit from this class.
- class jaxili.posterior.base_posterior.NeuralPosterior(model: NDENetwork, state: TrainState, verbose: bool = False, x: Array | None = None)[source]#
Bases:
objectPosterior $p(theta|x)$ with log_prob() and sample() methods.
The class wraps the trained neural network such that one can directly evaluate the log-probability and sample from the posterior.
Methods
sample(num_samples, key, x[, mcmc_method, ...])Define abstract method to sample from the posterior.
Set the default data for the posterior.
unnormalized_log_prob(theta)Define abstract method to compute the unnormalized log-probability of a given parameter.