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

#include <np_triadic_algorithm.h>

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

Public Member Functions

 TriadicAlgorithm (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 TriadicAlgorithm updates the cluster population assuming a dirichlet process as nonparametric prior.

Constructor & Destructor Documentation

◆ TriadicAlgorithm()

TriadicAlgorithm::TriadicAlgorithm ( 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 TriadicAlgorithm::printStatistics ( )
virtual

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

Implements UpdateClusterPopulation.

◆ update()

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