Docs
Loading...
Searching...
No Matches
Null_likelihood Class Reference

LogLikelihood equal to 1 to ignore data contribution and focus on prior. More...

#include <Null_likelihood.hpp>

Inheritance diagram for Null_likelihood:
Likelihood

Public Member Functions

 Null_likelihood (const Data &data, const Params &param)
double cluster_loglikelihood (int cluster_index) const override final
 Computes the full log-likelihood for a cluster.
double cluster_loglikelihood (int cluster_index, const Eigen::Ref< const Eigen::VectorXi > &cls_ass_k) const override final __attribute__((hot))
 Computes the full log-likelihood for a cluster with given assignments.
double point_loglikelihood_cond (int point_index, int cluster_index) const override final __attribute__((hot))
 Computes the conditional log-likelihood of a point given a cluster.
Public Member Functions inherited from Likelihood
 Likelihood (const Data &data, const Params &param)
virtual ~Likelihood ()=default

Additional Inherited Members

Protected Attributes inherited from Likelihood
const Datadata
 Reference to Data object with distances and allocations.
const Paramsparams
 Reference to model parameters.

Detailed Description

LogLikelihood equal to 1 to ignore data contribution and focus on prior.

Constructor & Destructor Documentation

◆ Null_likelihood()

Null_likelihood::Null_likelihood ( const Data & data,
const Params & param )
inline

Member Function Documentation

◆ cluster_loglikelihood() [1/2]

double Null_likelihood::cluster_loglikelihood ( int cluster_index) const
inlinefinaloverridevirtual

Computes the full log-likelihood for a cluster.

Parameters
cluster_indexIndex of the cluster to evaluate
Returns
Total log-likelihood (cohesion + repulsion)

This method computes both the within-cluster cohesion and the between-cluster repulsion contributions for the specified cluster.

Implements Likelihood.

◆ cluster_loglikelihood() [2/2]

double Null_likelihood::cluster_loglikelihood ( int cluster_index,
const Eigen::Ref< const Eigen::VectorXi > & cls_ass_k ) const
inlinefinaloverridevirtual

Computes the full 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 (cohesion + repulsion)

This overload allows computing the likelihood with a custom set of cluster assignments without modifying the data structure.

Implements Likelihood.

◆ point_loglikelihood_cond()

double Null_likelihood::point_loglikelihood_cond ( int point_index,
int cluster_index ) const
inlinefinaloverridevirtual

Computes the conditional log-likelihood of a point given a cluster.

Parameters
point_indexIndex of the point to evaluate
cluster_indexIndex of the target cluster
Returns
Conditional log-likelihood of assigning the point to the cluster

This method evaluates how well a point fits into a specific cluster, considering both its cohesion with points in that cluster and its repulsion from points in other clusters.

Implements Likelihood.


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