AM_mcmc_refit: Performs a Gibbs sampling reusing previous configuration

Description Usage Arguments Details Value Examples

View source: R/AM_mcmc.R

Description

Similar to AM_mcmc_fit, the AM_mcmc_refit function performs a Gibbs sampling in order to estimate a mixture. However parameters will be reused from a previous result from AM_mcmc_fit.

Usage

1
AM_mcmc_refit(y, fit, fixed_clustering, mcmc_parameters = AM_mcmc_parameters())

Arguments

y

input data, can be a vector or a matrix.

fit

previous output from AM_mcmc_fit that is used to setup kernel and priors.

fixed_clustering

is a vector CI of cluster assignment that will remain unchanged for every iterations.

mcmc_parameters

is a configuration list defined by AM_mcmc_parameters.

Details

In practice this function will call AM_mcmc_fit(y, fixed_clustering = fixed_clustering, ...); with the same parameters as previously specified.

Value

The return value is an AM_mcmc_output object.

Examples

1
2
3
4
5
6
7
8
 y = AM_sample_unipois()$y
 fit = AM_mcmc_fit( y , 
              AM_mix_hyperparams_unipois (alpha0=2, beta0=0.2), 
              mcmc_parameters = AM_mcmc_parameters(niter=20, burnin=0, thin=1, verbose=0))
 eam = AM_coclustering(fit)
 cluster = AM_salso(eam, "binder")
 refit = AM_mcmc_refit(y , fit, cluster, 
         mcmc_parameters = AM_mcmc_parameters(niter=20, burnin=0, thin=1, verbose=0));

AntMAN documentation built on July 23, 2021, 5:08 p.m.

Related to AM_mcmc_refit in AntMAN...