mcd.sampler.UnadjustedLangevin#
- class mcd.sampler.UnadjustedLangevin(pi_0, get_log_gamma, get_score_gamma_t, n_timesteps, T=1.0)[source]#
Bases:
objectMCD and AIS for the time-inhomogeneous unadjusted Langevin algorithm.
- get_log_gamma: Callable[[Array], Array][source]#
Gets the target log probability (potentially unnormalized).
- get_loss(model, key)[source]#
Computes the loss for a single sample from the diffusion process.
- Return type
Array
- get_sample_ais(key)[source]#
Generates a sample and its log importance weight using AIS.
- Return type
Tuple[Array,Array]
- get_sample_mcd(model, key)[source]#
Generates a sample and its log importance weight using MCD.
- Return type
Tuple[Array,Array]
- get_score_gamma_t: Callable[[Array, Array], Array][source]#
` abla log pi(t, x)`.
- Type
Gets
- Type
math
- get_trajectory_ais(key)[source]#
Generates a trajectory and its log importance weight with AIS.
- Return type
Tuple[Array,Array]