Package: proxymix 0.16.0.9000

proxymix: Kullback-Leibler Optimal Gaussian Mixture Proxies for Target Densities

Fits multivariate Gaussian-mixture proxies that are Kullback-Leibler optimal to user-supplied target densities on real Euclidean space. Three fitting regimes are unified under one verb: (i) closed-form moment matching for a single component, (ii) classical expectation-maximisation when independent samples are available, and (iii) importance-sampled expectation-maximisation that minimises the Kullback-Leibler divergence when the target can be evaluated point-wise but not (cheaply) sampled. Closed-form Gaussian-mixture operators (density, sampling, marginalisation, conditioning, divergence) round out the toolkit. The conditioning operator drives multiple imputation of data missing at random, covering the multimodal and heteroscedastic cases a single-Gaussian model cannot represent. Implements the regime hierarchy of van der Hoek and Elliott (2024) <doi:10.1080/07362994.2024.2372605>.

Authors:Max Moldovan [aut, cre], John van der Hoek [aut]

proxymix_0.16.0.9000.tar.gz
proxymix_0.16.0.9000.zip(r-4.7-any)proxymix_0.16.0.9000.zip(r-4.6-any)proxymix_0.16.0.9000.zip(r-4.5-any)
proxymix_0.16.0.9000.tgz(r-4.6-any)proxymix_0.16.0.9000.tgz(r-4.5-any)
proxymix_0.16.0.9000.tar.gz(r-4.7-any)proxymix_0.16.0.9000.tar.gz(r-4.6-any)
proxymix_0.16.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
proxymix/json (API)

# Install 'proxymix' in R:
install.packages('proxymix', repos = c('https://max578.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/max578/proxymix/issues

Pkgdown/docs site:https://max578.github.io

On CRAN:

Conda:

5.86 score 11 downloads 105 exports 9 dependencies

Last updated from:9593921002 (on main). Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK223
source / vignettesOK274
linux-releaseOK226
macos-releaseOK188
macos-oldrelOK122
windows-develOK201
windows-releaseOK211
windows-oldrelOK182
wasm-releaseOK119

Exports:as_midsbanana_targetbic_aiccensoreddgmmdonut_targetepanechnikov_targetess_summaryess_tracefit_em_samplesfit_kld_emfit_moment_matchfit_mppca_samplesfit_proxymixfit_upliftfrom_cffrom_cf_ellipticalfrom_cf_sourcesfrom_kdefrom_objectivegmmgmm_affinegmm_aggregategmm_anneal_pathgmm_canonicalisegmm_cfgmm_cf_distancegmm_cf_meangmm_cf_tail_probgmm_cf_variancegmm_completegmm_conditional_entropygmm_conditionalisegmm_convolvegmm_counterfactualgmm_counterfactual_lawgmm_covgmm_covariancesgmm_dimgmm_divergencegmm_entropygmm_eos_testgmm_evidencegmm_filtergmm_fitgmm_fit_ensemblegmm_fit_qualitygmm_imputationgmm_imputegmm_independence_graphgmm_intervenegmm_kldgmm_marginalisegmm_meangmm_meansgmm_missinggmm_mixgmm_modesgmm_mutual_informationgmm_n_componentsgmm_observegmm_productgmm_reducegmm_targetgmm_target_from_posteriorgmm_target_from_samplesgmm_weightshellinger_mcinit_kmeansinit_moment_seedinit_randominit_warm_startis_mvnis_mvtis_proposalis_uniformkld_tracemarmaxent_targetmixture_targetmnarmulti_start_best_ofpgmmproposal_mvnproposal_mvtproposal_uniformproxy_cateproxy_confounding_gapproxy_decideproxy_fmiproxy_functional_ciproxy_identification_reportproxy_mnar_sensitivityproxy_overlapproxy_policy_valueproxy_poolproxy_predictproxy_regime_segmentsproxy_retrospective_upliftproxy_upliftqgmmrgmmselect_Nuplift_identificationuplift_model

Dependencies:BHclidata.tablemvnfastRcppRcppArmadillorlangS7withr

Missing data that depends on the missing value
The problem | Package capabilities | Addressing the problem | Data in which the large values go missing | Impute under two assumptions | Sweep the assumed slope | Censoring at a known limit | Comparison with mice, Amelia, sampleSelection and the Tobit model | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-29
Started: 2026-06-21

Testing the last observation for instability
The problem | Package capabilities | Addressing the problem | A model and a stable series | The same series with a broken final value | What the filter expected | How the subsampling p-value is reached | How often each calibration rejects when the model is known | Comparison with strucchange, changepoint, KFAS and dlm | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-28
Started: 2026-06-21

Fitting a proxy to a density you cannot sample
The problem | Package capabilities | Addressing the problem | Which fitting method applies | A target with no sampler | Fit the proxy | Check the fit before using it | Compare the proxy with the target | Use the proxy | Comparison with the Laplace approximation, Stan and BayesianTools | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-27
Started: 2026-05-14

Reading the entropy of a fitted mixture
The problem | Package capabilities | Addressing the problem | Why some quantities are exact | Entropy of a mixture | Distance between two mixtures | Dependence between variables | Cooling the fit | Maximum-entropy targets | Choosing the number of components | Which variables are related | Comparison with FNN, mclust and pcalg | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-27
Started: 2026-06-17

Choosing between the three fitting regimes
The problem | Package capabilities | Addressing the problem | A target with both a formula and a sample | Method (i): one normal distribution with the sample's mean and spread | Method (ii): several normal distributions fitted to the sample | Method (iii): several normal distributions fitted to the formula | The three fits side by side | What each method improves in each round | One normal distribution fitted two ways, against the exact answer | Comparison with mclust, mixtools and flexmix | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-26
Started: 2026-05-14

Compressing a Bayesian posterior you can evaluate but not sample
The problem | Package capabilities | Addressing the problem | A posterior with no sampler | Fit the proxy | Check the fit before using it | The normalising constant | Read the answers off the proxy | Check the answers against exact integration | Error bars on the proxy itself | Comparison with Stan, INLA, a Laplace approximation and BayesianTools | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-26
Started: 2026-07-05

Compressing a kernel density estimate into a mixture
The problem | Package capabilities | Addressing the problem | A sample from two groups | The recovered groups | Check the fit | What the compression loses | Use the proxy | The effect of the bandwidth | Comparison with ks, np, KernSmooth, mclust and mixtools | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-26
Started: 2026-05-14

How well a mixture proxies four awkward shapes
The problem | Package capabilities | Addressing the problem | Fit the three shapes that cover the whole plane | Compare each proxy with its target | Measure each fit in two ways | Give the ring more components and more trial points | A density with hard edges | When the trial points miss the target | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-26
Started: 2026-05-14

Imputing missing data with a mixture
The problem | Package capabilities | Addressing the problem | Data with two groups and known missing values | Impute with a mixture and with a single normal distribution | Where the imputed values fall | Pool the mean of x2 | Pool a regression slope with mice | Comparison with mice and Amelia | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-26
Started: 2026-06-20

Mapping the optima of an objective
The problem | Package capabilities | Addressing the problem | From an objective to a distribution | Two minima in one dimension | Check the fit before using it | Four minima in two dimensions | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-26
Started: 2026-06-19

One mixture, many methods
The problem | Package capabilities | Addressing the problem | Regression: lm() | Kernel regression: Nadaraya-Watson | Clustering: kmeans() | Principal components: prcomp() | Penalised regression: ridge | Treatment effects: a separate model for each arm | Other uses | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-26
Started: 2026-06-17

The closed-form operator calculus on a mixture
The problem | Package capabilities | Addressing the problem | A mixture to work with | Pass the mixture through a sensor | Update after a noisy measurement | Check the update against the Kalman formulas | Add variables together | Condition on values known exactly | Two measurements, in turn or together | Track an object over time | Keep the number of components small | The whole filter in one call | Comparison with dlm, KFAS and particle filters | Interpretation | Limitations | Further reading | References | Reproduce

Last update: 2026-09-26
Started: 2026-05-14

Readme and manuals

Help Manual

Help pageTopics
Convert imputations to a mice multiply-imputed datasetas_mids
Plot a fitted Gaussian-mixture proxyautoplot.gmm_fit
Banana-shaped 2-D targetbanana_target
Information criteria: BIC, AIC, and ICLbic_aic
Density of a Gaussian mixturedgmm
Donut-shaped 2-D targetdonut_target
Compact-support Epanechnikov targetepanechnikov_target
Summary of importance-sampling diagnosticsess_summary
Effective sample size of the importance-sampling weightsess_trace
Classical EM fit on samplesfit_em_samples
Importance-sampled KLD-EM fit (regime iii)fit_kld_em
Closed-form moment-matching fitfit_moment_match
Mixture of probabilistic PCA fitted to samplesfit_mppca_samples
Fit a Gaussian-mixture proxy to a target densityfit_proxymix
Fit an uplift / next-best-action model from a data framefit_uplift
Fit a Gaussian mixture to a characteristic functionfrom_cf
Fit concentric normals to an elliptical characteristic functionfrom_cf_elliptical
Fit a characteristic function that is a linear mix of independent sourcesfrom_cf_sources
Compile a kernel-density estimate into a Gaussian-mixture proxyfrom_kde
Map the optima of an objective with a Gaussian-mixture proxyfrom_objective
Glance at a fitted Gaussian-mixture proxyglance.gmm_fit
A Gaussian mixturegmm
Affine pushforward of a Gaussian mixturegmm_affine
Aggregation pushforward of a Gaussian mixturegmm_aggregate
Phase-transition component discovery by deterministic annealinggmm_anneal_path
Canonicalise the component ordering of a Gaussian mixturegmm_canonicalise
Characteristic function of a Gaussian mixturegmm_cf
Kolmogorov distance between a characteristic-function target and a mixturegmm_cf_distance
The counterfactual meangmm_cf_mean
A counterfactual tail probabilitygmm_cf_tail_prob
The counterfactual variancegmm_cf_variance
Extract completed datasets from a 'gmm_imputation'gmm_complete
Renyi-2 or Shannon entropy of a conditional Gaussian mixturegmm_conditional_entropy
Conditional of a Gaussian mixturegmm_conditionalise
Convolution of two independent Gaussian mixturesgmm_convolve
Counterfactual law of one unit (abduction, action, prediction)gmm_counterfactual
A per-unit counterfactual lawgmm_counterfactual_law
Dimension of a Gaussian mixturegmm_dim
Divergence between two Gaussian mixturesgmm_divergence
Renyi-2 or Shannon entropy of a Gaussian mixturegmm_entropy
End-of-sample instability test on a Gaussian state-space filtergmm_eos_test
Estimate the target's normalising constant from a fitted proxygmm_evidence
Bounded Gaussian-sum filtering over an observation seriesgmm_filter
A fitted Gaussian-mixture proxygmm_fit
Bootstrap ensemble of a fitted proxygmm_fit_ensemble
The quality certificate of a fit or derived mixturegmm_fit_quality
A Gaussian-mixture multiple-imputation resultgmm_imputation
Multiple imputation by Gaussian-mixture conditioninggmm_impute
Conditional-independence (Gaussian graphical model) structure of a mixturegmm_independence_graph
Interventional law of a Gaussian mixture (the do-operator)gmm_intervene
Kullback-Leibler divergence between two Gaussian mixturesgmm_kld
Marginal of a Gaussian mixturegmm_marginalise
Mean and covariance of a Gaussian mixturegmm_cov gmm_mean
Condition a Gaussian mixture on the exact values of some coordinatesgmm_missing
Mix Gaussian mixtures into one mixturegmm_mix
Modes of a Gaussian mixturegmm_modes
Cauchy-Schwarz mutual information between two coordinate blocksgmm_mutual_information
Number of components in a Gaussian mixturegmm_n_components
Bayesian update of a Gaussian mixture on a noisy linear observationgmm_observe
Pointwise product of two Gaussian mixturesgmm_product
Reduce a Gaussian mixture to fewer componentsgmm_reduce
A target density on R^pgmm_target
Compile an unnormalised Bayesian posterior into a 'gmm_target'gmm_target_from_posterior gmm_target_from_posterior.default gmm_target_from_posterior.function
Build a target from samples alonegmm_target_from_samples
Component parameters of a Gaussian mixturegmm_covariances gmm_means gmm_weights
Monte-Carlo Hellinger distance between a fit and its targethellinger_mc
k-means initialisationinit_kmeans
Moment-seed initialisationinit_moment_seed
Random initialisationinit_random
Warm-start initialisation from an existing fitinit_warm_start
Multivariate-normal proposalis_mvn
Multivariate-t proposalis_mvt
An importance-sampling proposalis_proposal
Uniform-on-a-box proposalis_uniform
Per-iteration KLD trace of a fitkld_trace
Maximum-entropy target under moment and support constraintsmaxent_target
Missingness mechanisms for multiple imputationcensored mar mechanism mnar
Three-component Gaussian-mixture targetmixture_target
Multi-start best-of wrappermulti_start_best_of
Distribution and quantile functions of a one-dimensional mixturepgmm qgmm
Preferred names for the importance-proposal constructorsproposal_mvn proposal_mvt proposal_uniform
Heterogeneous treatment effects (CATE / uplift)proxy_cate
Confounding gap: the sensitivity of the effect to the latent regimeproxy_confounding_gap
Optimal action and expected incremental value per unitproxy_decide
Fraction of missing information for a column meanproxy_fmi
Percentile interval for any functional of a fitted proxyproxy_functional_ci
The identification report (an executive one-pager)proxy_identification_report
Missing-not-at-random sensitivity analysis for a coordinate meanproxy_mnar_sensitivity
Per-unit overlap / positivity diagnosticproxy_overlap
Off-line value of a targeting policyproxy_policy_value
Pool a column mean across imputationsproxy_pool
Predicted outcome under a treatment (the seeing rung)proxy_predict
The fitted regimes as an interpretable segment tableproxy_regime_segments
Retrospective (counterfactual-mean) uplift for observed unitsproxy_retrospective_uplift
Uplift (alias of 'proxy_cate()' for a binary treatment)proxy_uplift
Sample from a Gaussian mixturergmm
Select the number of mixture componentsselect_N
Tidy a Gaussian mixture into a component tabletidy.gmm
Identification-report objectuplift_identification
A fitted uplift / next-best-action modeluplift_model