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

Abstract base class for likelihood computation. More...

#include <Likelihood.hpp>

Inheritance diagram for Likelihood:
Gamma_likelihood Natarajan_likelihood Natarajan_likelihood_summaryStats Null_likelihood

Public Member Functions

 Likelihood (const Data &data, const Params &param)
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 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 Datadata
 Reference to Data object with distances and allocations.
const Paramsparams
 Reference to model parameters.

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,
const Params & param )
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, 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, Natarajan_likelihood, Natarajan_likelihood_summaryStats, and Null_likelihood.

◆ 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, 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.

◆ params

const Params& Likelihood::params
protected

Reference to model parameters.


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