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>
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
-
Integer | Integer types used in matrices/tensors. |
Scalar | Model parameter types. |
template<typename Integer , typename Scalar >
Construct the calculator class and initialize computation variables.
- Parameters
-
X | Matrix to allocate. |
model_params | Model parameters. |
template<typename Integer , typename Scalar >
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: