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

#include <np_jain_neal_algorithm.h>

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

Public Member Functions

 JainNealAlgorithm (random_engine_t &generator, distribution_t &likelihood, dirichlet_process &nonparametrics)
 
 ~JainNealAlgorithm ()
 
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 JainNealAlgorithm updates the cluster population assuming a dirichlet process as nonparametric prior.

Constructor & Destructor Documentation

◆ JainNealAlgorithm()

JainNealAlgorithm::JainNealAlgorithm ( 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)

◆ ~JainNealAlgorithm()

JainNealAlgorithm::~JainNealAlgorithm ( )

Member Function Documentation

◆ printStatistics()

void JainNealAlgorithm::printStatistics ( )
virtual

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

Implements UpdateClusterPopulation.

◆ update()

void JainNealAlgorithm::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: