bnmf-algs
Public Member Functions | List of all members
bnmf_algs::details::TotalMarginalCalculator< Integer, Scalar > Class Template Reference

Class to compute total \(p(X|\Theta) = \sum_S p(X|S)p(S|\Theta)\) for all possible allocation tensors while storing shared state between function invocations. More...

#include <alloc_model_funcs.hpp>

Public Member Functions

 TotalMarginalCalculator (const matrix_t< Integer > &X, const alloc_model::Params< Scalar > &model_params)
 Construct the calculator class and initialize computation variables. More...
 
double calc_marginal ()
 Calculate total marginal by calculating \(\sum_S p(X|S)p(S|\Theta)\) for every possible allocation tensor \(S\). More...
 

Detailed Description

template<typename Integer, typename Scalar>
class bnmf_algs::details::TotalMarginalCalculator< Integer, Scalar >

Class to compute total \(p(X|\Theta) = \sum_S p(X|S)p(S|\Theta)\) for all possible allocation tensors while storing shared state between function invocations.

Template Parameters
IntegerInteger types used in matrices/tensors.
ScalarModel parameter types.

Constructor & Destructor Documentation

template<typename Integer , typename Scalar >
bnmf_algs::details::TotalMarginalCalculator< Integer, Scalar >::TotalMarginalCalculator ( const matrix_t< Integer > &  X,
const alloc_model::Params< Scalar > &  model_params 
)
inline

Construct the calculator class and initialize computation variables.

Parameters
XMatrix to allocate.
model_paramsModel parameters.

Member Function Documentation

template<typename Integer , typename Scalar >
double bnmf_algs::details::TotalMarginalCalculator< Integer, Scalar >::calc_marginal ( )
inline

Calculate total marginal by calculating \(\sum_S p(X|S)p(S|\Theta)\) for every possible allocation tensor \(S\).

Returns
Total marginal, \(p(X|\Theta)\).

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