Learn R Programming

AntMAN (version 1.1.0)

Anthology of Mixture Analysis Tools

Description

Fits finite Bayesian mixture models with a random number of components. The MCMC algorithm implemented is based on point processes as proposed by Argiento and De Iorio (2019) and offers a more computationally efficient alternative to reversible jump. Different mixture kernels can be specified: univariate Gaussian, multivariate Gaussian, univariate Poisson, and multivariate Bernoulli (latent class analysis). For the parameters characterising the mixture kernel, we specify conjugate priors, with possibly user specified hyper-parameters. We allow for different choices for the prior on the number of components: shifted Poisson, negative binomial, and point masses (i.e. mixtures with fixed number of components).

Copy Link

Version

Install

install.packages('AntMAN')

Monthly Downloads

261

Version

1.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Bruno Bodin

Last Published

July 23rd, 2021

Functions in AntMAN (1.1.0)

AM_demo_uvn_poi

Returns an example of AM_mcmc_fit output produced by the univariate Gaussian model
AM_clustering

Return the clustering matrix
AM_emp_bayes_uninorm

compute the hyperparameters of an Normal-Inverse-Gamma distribution using an empirical Bayes approach
AM_extract

AM_coclustering

Return the co-clustering matrix
AM_mix_components_prior

S3 class AM_mix_components_prior
AM_demo_uvp_poi

Returns an example of AM_mcmc_fit output produced by the univariate Poisson model
AM_demo_mvb_poi

Returns an example of AM_mcmc_fit output produced by the multivariate bernoulli model
AM_find_gamma_NegBin

Given that the prior on M is a Negative Binomial, find the \(\gamma\) hyperparameter of the weights prior to match \(E(K)=K*\), where \(K*\) is user-specified
AM_mcmc_parameters

MCMC Parameters
AM_find_gamma_Delta

Given that the prior on M is a dirac delta, find the \(\gamma\) hyperparameter of the weights prior to match \(E(K)=K*\), where \(K*\) is user-specified
AM_mcmc_refit

Performs a Gibbs sampling reusing previous configuration
AM_mix_hyperparams

S3 class AM_mix_hyperparams
AM_mcmc_fit

Performs a Gibbs sampling
AM_mix_components_prior_pois

Generate a configuration object for a Poisson prior on the number of mixture components
AM_mix_components_prior_negbin

Generate a configuration object for a Shifted Negative Binomial prior on the number of mixture components
AM_mix_hyperparams_uninorm

univariate Normal mixture hyperparameters
AM_mix_hyperparams_multinorm

multivariate Normal mixture hyperparameters
AM_plot_similarity_matrix

Plot the Similarity Matrix
AM_plot_values

Plot posterior interval estimates obtained from MCMC draws
AM_demo_mvn_poi

Returns an example of AM_mcmc_fit output produced by the multivariate gaussian model
AM_prior_K_Delta

Computes the prior on the number of clusters
AM_mix_weights_prior_gamma

specify a prior on the hyperparameter \(\gamma\) for the Dirichlet mixture weights prior
AM_sample_multinorm

AM_sample_multinorm
summary.AM_mcmc_output

summary information of the AM_mcmc_output object
AM_prior_K_NegBin

computes the prior number of clusters
AM_mix_hyperparams_multiber

multivariate Bernoulli mixture hyperparameters (Latent Class Analysis)
AM_plot_traces

AM_prior

S3 class AM_prior
AM_sample_uninorm

AM_sample_uninorm
AM_mcmc_configuration

S3 class AM_mcmc_configuration
AM_find_gamma_Pois

Given that the prior on M is a shifted Poisson, find the \(\gamma\) hyperparameter of the weights prior to match \(E(K)=K^{*}\), where \(K^{*}\) is user-specified
AM_plot_pmf

AM_mcmc_output

S3 class AM_mcmc_output
AM_sample_unipois

AM_sample_unipois
AM_sample_multibin

AM_sample_multibin
AM_plot_chaincor

Plot the Autocorrelation function
plot.AM_mcmc_output

plot AM_mcmc_output
IAM_compute_stirling_ricor_log

Compute stirling ricor log
carcinoma

Carcinoma dataset
IAM_compute_stirling_ricor_abs

Compute the logarithm of the absolute value of the generalized Sriling number of second Kind (mi pare) See charambeloides, using a recursive formula Devo vedere la formula
AM_mix_hyperparams_unipois

univariate Poisson mixture hyperparameters
AM_mix_weights_prior

S3 class AM_mix_weights_prior
plot.AM_prior

plot AM_prior
AM_mix_components_prior_dirac

Generate a configuration object that contains a Point mass prior
summary.AM_mix_components_prior

summary information of the AM_mix_components_prior object
brain

Teen Brain Images from the National Institutes of Health, U.S.
summary.AM_mix_hyperparams

summary information of the AM_mix_hyperparams object
summary.AM_mcmc_configuration

summary information of the AM_mcmc_configuration object
AM_plot_density

said

Usage frequency of the word "said" in the Brown corpus
AM_plot_pairs

Plot AM_mcmc_output scatterplot matrix
AntMAN

AntMAN: A package for fitting finite Bayesian Mixture models with a random number of components
summary.AM_prior

summary information of the AM_prior object
IAM_VnkDelta

Compute the value V(n,k), needed to caclulate the eppf of a Finite Dirichlet process when the prior on the component-weigts of the mixture is a Dirichlet with parameter gamma (i.e. when unnormailized weights are distributed as Gamma(\(\gamma\),1) ) when the number of component are fixed to M^*, i.e. a Dirac prior assigning mass only to M^* is assumed. See Section 9.1.1 of the Paper Argiento de Iorio 2019 for more details.
galaxy

Galaxy velocities dataset
list_values

Internal function that produces a string from a list of values
summary.AM_mix_weights_prior

summary information of the AM_mix_weights_prior object
AM_plot_mvb_cluster_frequency

Visualise the cluster frequency plot for the multivariate bernoulli model
IAM_mcmc_neff

IAM_mcmc_neff MCMC Parameters
AM_prior_K_Pois

Computes the prior number of clusters
AM_salso

Sequentially Allocated Latent Structure Optimisation
IAM_VnkPoisson

Compute the value V(n,k), needed to caclulate the eppf of a Finite Dirichlet process when the prior on the component-weigts of the mixture is a Dirichlet with parameter gamma (i.e. when unnormailized weights are distributed as Gamma(\(\gamma\),1) ) when the prior on the number of componet is Shifted Poisson of parameter Lambda. See Section 9.1.1 of the Paper Argiento de Iorio 2019.
IAM_VnkNegBin

Compute the value V(n,k), needed to caclulate the eppf of a Finite Dirichlet process when the prior on the component-weigts of the mixture is a Dirichlet with parameter gamma (i.e. when unnormailized weights are distributed as Gamma(\(\gamma\),1) ) when the prior on the number of componet is Negative Binomial with parameter r and pwith mean is mu =1+ r*p/(1-p) TODO: CHECK THIS FORMULA!!!. See Section 9.1.1 of the Paper Argiento de Iorio 2019 for more details
IAM_mcmc_error

Internal function used to compute the MCMC Error as a batch mean.