Docs
Loading...
Searching...
No Matches
Likelihood Class Referenceabstract

Abstract base class for likelihood computation. More...

#include <Likelihood.hpp>

Inheritance diagram for Likelihood:
Gamma_likelihood Gamma_likelihood_distances GaussianMixtureModel_likelihood Natarajan_likelihood Natarajan_likelihood_summaryStats Null_likelihood

Public Member Functions

 Likelihood (const Data &data)
virtual double cluster_loglikelihood (int cluster_index) const =0
 Computes the log-likelihood for a cluster.
virtual double cluster_loglikelihood (int cluster_index, const Eigen::Ref< const Eigen::VectorXi > &cls_ass_k) const =0
 Computes the log-likelihood for a cluster with given assignments.
virtual double clusters_loglikelihood (int c1, int c2) const
 Computes the joint log-likelihood for two clusters.
virtual double point_loglikelihood_cond (int point_index, int cluster_index) const =0
 Conditional log-likelihood of a point in a particular cluster.
virtual ~Likelihood ()=default

Protected Attributes

const Data & data
 Reference to Data object with distances and allocations.

Detailed Description

Abstract base class for likelihood computation.

This class defines the interface for computing likelihoods in clustering models. Derived classes must implement methods for computing both cluster-level and point-level conditional log-likelihoods, which are essential for Gibbs and split-merge MCMC algorithms.

Constructor & Destructor Documentation

◆ Likelihood()

Likelihood::Likelihood ( const Data & data)
inline

◆ ~Likelihood()

virtual Likelihood::~Likelihood ( )
virtualdefault

Member Function Documentation

◆ cluster_loglikelihood() [1/2]

virtual double Likelihood::cluster_loglikelihood ( int cluster_index) const
pure virtual

Computes the log-likelihood for a cluster.

Parameters
cluster_indexIndex of the cluster to evaluate
Returns
Total log-likelihood of the cluster
Note
Useful for split-merge algorithms

Implemented in Gamma_likelihood, Gamma_likelihood_distances, GaussianMixtureModel_likelihood, Natarajan_likelihood, Natarajan_likelihood_summaryStats, and Null_likelihood.

◆ cluster_loglikelihood() [2/2]

virtual double Likelihood::cluster_loglikelihood ( int cluster_index,
const Eigen::Ref< const Eigen::VectorXi > & cls_ass_k ) const
pure virtual

Computes the log-likelihood for a cluster with given assignments.

Parameters
cluster_indexIndex of the cluster to evaluate
cls_ass_kVector of point indices in the cluster
Returns
Total log-likelihood of the cluster
Note
Useful for split-merge algorithms

Implemented in Gamma_likelihood, Gamma_likelihood_distances, GaussianMixtureModel_likelihood, Natarajan_likelihood, Natarajan_likelihood_summaryStats, and Null_likelihood.

◆ clusters_loglikelihood()

virtual double Likelihood::clusters_loglikelihood ( int c1,
int c2 ) const
inlinevirtual

Computes the joint log-likelihood for two clusters.

Parameters
c1Index of first cluster
c2Index of second cluster
Returns
Joint log-likelihood of clusters c1 and c2
Note
Default implementation assumes cluster independence. Derived classes with inter-cluster interactions can override this.

Reimplemented in Natarajan_likelihood, and Natarajan_likelihood_summaryStats.

◆ point_loglikelihood_cond()

virtual double Likelihood::point_loglikelihood_cond ( int point_index,
int cluster_index ) const
pure virtual

Conditional log-likelihood of a point in a particular cluster.

Parameters
point_indexIndex of the point to evaluate
cluster_indexIndex of the cluster
Returns
Conditional log-likelihood
Note
Useful for Gibbs sampling

Implemented in Gamma_likelihood, Gamma_likelihood_distances, GaussianMixtureModel_likelihood, Natarajan_likelihood, Natarajan_likelihood_summaryStats, and Null_likelihood.

Member Data Documentation

◆ data

const Data& Likelihood::data
protected

Reference to Data object with distances and allocations.


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