An is_proposal packages a sampler with its corresponding log-density.
Pass one to fit_kld_em() (or fit_proxymix() with regime = "kld")
to plug an alternative proposal into the regime-(iii) loop.
Arguments
- n_dim
Integer scalar — the ambient dimension
p(the property is calledn_dimrather thandimbecause S7 reservesdimas an attribute name).- sample
Function:
function(n)returning annbypnumeric matrix of independent draws.- log_density
Function:
function(x)taking a numeric matrixnbypand returning a length-nnumeric vector oflog q(x).- name
Human-readable name.
- metadata
Optional list of additional descriptors.
See also
Other classes:
autoplot.gmm_fit,
glance.gmm_fit,
gmm(),
gmm_counterfactual_law(),
gmm_dim(),
gmm_fit(),
gmm_n_components(),
gmm_target(),
gmm_weights(),
tidy.gmm