noparama  v0.0.1
Nonparametric Bayesian models
Public Member Functions | List of all members
NealAlgorithm8 Class Reference

#include <np_neal_algorithm8.h>

Inheritance diagram for NealAlgorithm8:
Inheritance graph
[legend]
Collaboration diagram for NealAlgorithm8:
Collaboration graph
[legend]

Public Member Functions

 NealAlgorithm8 (random_engine_t &generator, distribution_t &likelihood, dirichlet_process &nonparametrics)
 
void update (membertrix &cluster_matrix, const data_ids_t &data_ids)
 
void printStatistics ()
 
- Public Member Functions inherited from UpdateClusterPopulation
 UpdateClusterPopulation ()
 
virtual ~UpdateClusterPopulation ()
 

Additional Inherited Members

- Protected Attributes inherited from UpdateClusterPopulation
std::default_random_engine _generator
 
std::uniform_real_distribution< double > _distribution
 
char _verbosity
 

Detailed Description

This class NealAlgorithm8 updates the cluster population assuming a dirichlet process as nonparametric prior. It is a so-called auxiliary variables method. There is not just one new cluster proposed, but several at once. This number

Constructor & Destructor Documentation

◆ NealAlgorithm8()

NealAlgorithm8::NealAlgorithm8 ( random_engine_t &  generator,
distribution_t &  likelihood,
dirichlet_process &  nonparametrics 
)

Construct update method for cluster population.

Parameters
[in]generatorRandom generator
[in]likelihoodLikelihood function to be used in update()
[in]nonparametricsSufficient statistics of the nonparametric prior (e.g. Dirichlet)

Member Function Documentation

◆ printStatistics()

void NealAlgorithm8::printStatistics ( )
virtual

MCMC statistics. How many times are steps rejected, etc.

Implements UpdateClusterPopulation.

◆ update()

void NealAlgorithm8::update ( membertrix cluster_matrix,
const data_ids_t data_ids 
)
virtual

Update the cluster population. The observation has to be deleted beforehand.

Parameters
[in,out]cluster_matrixCluster-observation membership matrix
[in]data_idsObservations to be considered for existing and new cluster

Implements UpdateClusterPopulation.


The documentation for this class was generated from the following files: