Base class for sampling the latent variable U in NGGP mixture models.
Manages distance matrices and cluster allocations for points.
Definition Data.hpp:27
void sampling_V()
Samples U using MALA on the transformed V = log(U) scale.
Definition MALA.cpp:23
void sampling_U()
Samples U using MALA on the original U scale.
Definition MALA.cpp:91
void update_U() override
Performs one MALA update step for the latent variable U.
Definition MALA.cpp:8
double grad_log_conditional_density_V(double v) const
Computes the gradient of log conditional density with respect to V = log(U).
Definition MALA.cpp:79
double old_epsilon
Previous value of epsilon, used for restart mechanism in adaptive tuning.
Definition MALA.hpp:37
void Robbins_Monro_tuning()
Performs Robbins-Monro tuning of the proposal step size epsilon.
Definition MALA.cpp:150
int BI_adapt
Number of initial iterations before adaptive tuning begins.
Definition MALA.hpp:125
double epsilon
Step size parameter for the Langevin dynamics proposal.
Definition MALA.hpp:33
MALA(Params &p, Data &d, bool use_V=false, double eps=1, bool tuning=false)
Constructor for MALA sampler.
Definition MALA.hpp:139
bool use_V
Flag to use V = log(U) transformation instead of direct U sampling.
Definition MALA.hpp:89
bool tuning_enabled
Flag to enable/disable Robbins-Monro adaptive tuning of step size.
Definition MALA.hpp:93
double grad_log_conditional_density_U(double U) const
Computes the gradient of log conditional density with respect to U.
Definition MALA.cpp:137
bool accept
Flag indicating whether the last proposal was accepted.
Definition MALA.hpp:63
U_sampler(Params &p, Data &d)
Constructor for the U_sampler class.
Definition U_sampler.hpp:154
double U
Current value of the latent variable U (initialized to 1.0).
Definition U_sampler.hpp:66
Structure containing all parameters needed for the NGGP (Normalized Generalized Gamma Process) and DP...
Definition Params.hpp:35