Skip to contents

Top-level interface

The unified fitting verb and its dispatcher.

fit_proxymix()
Fit a Gaussian-mixture proxy to a target density

Classes

The S7 class hierarchy.

autoplot.gmm_fit
Plot a fitted Gaussian-mixture proxy
glance.gmm_fit
Glance at a fitted Gaussian-mixture proxy
gmm()
A Gaussian mixture
gmm_counterfactual_law()
A per-unit counterfactual law
gmm_dim()
Dimension of a Gaussian mixture
gmm_fit()
A fitted Gaussian-mixture proxy
gmm_n_components()
Number of components in a Gaussian mixture
gmm_target()
A target density on R^p
gmm_weights() gmm_means() gmm_covariances()
Component parameters of a Gaussian mixture
is_proposal()
An importance-sampling proposal
tidy.gmm
Tidy a Gaussian mixture into a component table

Target constructors

Ways to build a gmm_target — from samples, from a log-density, or from a built-in.

banana_target()
Banana-shaped 2-D target
donut_target()
Donut-shaped 2-D target
epanechnikov_target()
Compact-support Epanechnikov target
gmm_target_from_samples()
Build a target from samples alone
maxent_target()
Maximum-entropy target under moment and support constraints
mixture_target()
Three-component Gaussian-mixture target

Fitting regimes

The three KL-optimal fitting regimes from Hoek and Elliott (2024).

fit_em_samples()
Classical EM fit on samples
fit_kld_em()
Importance-sampled KLD-EM fit (regime iii)
fit_moment_match()
Closed-form moment-matching fit
from_kde()
Compile a kernel-density estimate into a Gaussian-mixture proxy
from_objective()
Map the optima of an objective with a Gaussian-mixture proxy
select_N()
Select the number of mixture components

Closed-form mixture operators

Density, sampling, marginalisation, conditioning, divergence.

dgmm()
Density of a Gaussian mixture
gmm_canonicalise()
Canonicalise the component ordering of a Gaussian mixture
gmm_conditionalise()
Conditional of a Gaussian mixture
gmm_divergence()
Divergence between two Gaussian mixtures
gmm_kld()
Kullback-Leibler divergence between two Gaussian mixtures
gmm_marginalise()
Marginal of a Gaussian mixture
gmm_mean() gmm_cov()
Mean and covariance of a Gaussian mixture
gmm_modes()
Modes of a Gaussian mixture
pgmm() qgmm()
Distribution and quantile functions of a one-dimensional mixture
rgmm()
Sample from a Gaussian mixture

Affine and causal operators

Pushforward, Kalman update, conditioning, the do-operator and the counterfactual.

gmm_affine()
Affine pushforward of a Gaussian mixture
gmm_aggregate()
Aggregation pushforward of a Gaussian mixture
gmm_convolve()
Convolution of two independent Gaussian mixtures
gmm_counterfactual()
Counterfactual law of one unit (abduction, action, prediction)
gmm_filter()
Bounded Gaussian-sum filtering over an observation series
gmm_intervene()
Interventional law of a Gaussian mixture (the do-operator)
gmm_missing()
Condition a Gaussian mixture on the exact values of some coordinates
gmm_mix()
Mix Gaussian mixtures into one mixture
gmm_observe()
Bayesian update of a Gaussian mixture on a noisy linear observation
gmm_product()
Pointwise product of two Gaussian mixtures
gmm_reduce()
Reduce a Gaussian mixture to fewer components

Decision layer (uplift / next-best-action)

One joint fit read as CATE, optimal action, off-line policy value, and an identification audit.

fit_uplift()
Fit an uplift / next-best-action model from a data frame
gmm_cf_mean()
The identified counterfactual mean
gmm_cf_tail_prob()
Refused: a tail probability of an individual counterfactual law
gmm_cf_variance()
Refused: the variance of an individual counterfactual law
gmm_counterfactual()
Counterfactual law of one unit (abduction, action, prediction)
gmm_intervene()
Interventional law of a Gaussian mixture (the do-operator)
proxy_cate()
Heterogeneous treatment effects (CATE / uplift)
proxy_confounding_gap()
Confounding gap: the sensitivity of the effect to the latent regime
proxy_decide()
Optimal action and expected incremental value per unit
proxy_identification_report()
The identification report (an executive one-pager)
proxy_overlap()
Per-unit overlap / positivity diagnostic
proxy_policy_value()
Off-line value of a targeting policy
proxy_predict()
Predicted outcome under a treatment (the seeing rung)
proxy_regime_segments()
The fitted regimes as an interpretable segment table
proxy_retrospective_uplift()
Retrospective (counterfactual-mean) uplift for observed units
proxy_uplift()
Uplift (alias of proxy_cate() for a binary treatment)
uplift_identification()
Identification-report object
uplift_model()
A fitted uplift / next-best-action model

Missing data

Multiple imputation by mixture conditioning, with pooling and the fraction of missing information.

as_mids()
Convert imputations to a mice multiply-imputed dataset
gmm_complete()
Extract completed datasets from a gmm_imputation
gmm_imputation()
A Gaussian-mixture multiple-imputation result
gmm_impute()
Multiple imputation by Gaussian-mixture conditioning
mar() mnar() censored()
Missingness mechanisms for multiple imputation
proxy_fmi()
Fraction of missing information for a column mean
proxy_mnar_sensitivity()
Missing-not-at-random sensitivity analysis for a coordinate mean
proxy_pool()
Pool a column mean across imputations

State-space instability testing

End-of-sample structural-break test on the Gaussian-sum filter.

gmm_eos_test()
End-of-sample instability test on a Gaussian state-space filter

Importance-sampling proposals

Pluggable proposals for regime (iii).

is_mvn()
Multivariate-normal proposal
is_mvt()
Multivariate-t proposal
is_uniform()
Uniform-on-a-box proposal
proposal_uniform() proposal_mvn() proposal_mvt()
Preferred names for the importance-proposal constructors

Interoperability

Compiling external Bayesian posteriors into proxies.

gmm_target_from_posterior()
Compile an unnormalised Bayesian posterior into a gmm_target

Initialisation

Initial guesses + best-of-multistart wrapper.

init_kmeans()
k-means initialisation
init_moment_seed()
Moment-seed initialisation
init_random()
Random initialisation
init_warm_start()
Warm-start initialisation from an existing fit
multi_start_best_of()
Multi-start best-of wrapper

Diagnostics

KLD trace, ESS, Hellinger MC, information criteria.

bic_aic()
Information criteria: BIC, AIC, and ICL
ess_summary()
Summary of importance-sampling diagnostics
ess_trace()
Effective sample size of the importance-sampling weights
gmm_anneal_path()
Phase-transition component discovery by deterministic annealing
gmm_conditional_entropy()
Conditional predictive entropy of a Gaussian mixture
gmm_entropy()
Differential entropy of a Gaussian mixture
gmm_evidence()
Estimate the target's normalising constant from a fitted proxy
gmm_fit_ensemble()
Bootstrap ensemble of a fitted proxy
gmm_fit_quality()
The quality certificate of a fit or derived mixture
gmm_independence_graph()
Conditional-independence (Gaussian graphical model) structure of a mixture
gmm_mutual_information()
Cauchy-Schwarz mutual information between two coordinate blocks
hellinger_mc()
Monte-Carlo Hellinger distance between a fit and its target
kld_trace()
Per-iteration KLD trace of a fit
proxy_functional_ci()
Percentile interval for any functional of a fitted proxy