bnmf-algs
Public Member Functions | Public Attributes | List of all members
bnmf_algs::alloc_model::Params< Scalar > Struct Template Reference

Structure to hold the parameters for the Allocation Model [5]. More...

#include <alloc_model_params.hpp>

Public Member Functions

 Params (Scalar a, Scalar b, const std::vector< Scalar > &alpha, const std::vector< Scalar > &beta)
 Construct Params manually with the given distribution parameters. More...
 
 Params (const shape< 3 > &tensor_shape)
 Construct Params with the default distribution parameters according to the given tensor shape. More...
 
 Params ()=default
 

Public Attributes

Scalar a
 Shape parameter of Gamma distribution. More...
 
Scalar b
 Rate parameter of Gamma distribution. More...
 
std::vector< Scalar > alpha
 Parameter vector of Dirichlet prior for matrix \(W_{x \times y}\) of size \(x\). More...
 
std::vector< Scalar > beta
 Parameter vector of Dirichlet prior for matrix \(H_{z \times y}\) of size \(z\). More...
 

Detailed Description

template<typename Scalar>
struct bnmf_algs::alloc_model::Params< Scalar >

Structure to hold the parameters for the Allocation Model [5].

According to the Allocation Model,

\[ L_j \sim \mathcal{G}(a, b) \qquad W_{:k} \sim \mathcal{D}(\alpha) \qquad H_{:j} \sim \mathcal{D}(\beta) \]

and \(S_{ijk} \sim \mathcal{PO}(W_{ik}H_{kj}L_j)\).

Template Parameters
ScalarType of the parameters. Common choices are double and float, but integer-like types can also be used.

Constructor & Destructor Documentation

template<typename Scalar>
bnmf_algs::alloc_model::Params< Scalar >::Params ( Scalar  a,
Scalar  b,
const std::vector< Scalar > &  alpha,
const std::vector< Scalar > &  beta 
)
inline

Construct Params manually with the given distribution parameters.

Parameters
aShape parameter of Gamma distribution.
bRate parameter of Gamma distribution.
alphaParameter vector of Dirichlet prior for matrix \(W_{x \times y}\) of size \(x\).
betaParameter vector of Dirichlet prior for matrix \(H_{z \times y}\) of size \(z\).
template<typename Scalar>
bnmf_algs::alloc_model::Params< Scalar >::Params ( const shape< 3 > &  tensor_shape)
inlineexplicit

Construct Params with the default distribution parameters according to the given tensor shape.

Default distribution parameters are

\begin{eqnarray*} \mbox{a} &=& 1 \\ \mbox{b} &=& 10 \\ \mbox{alpha} &=& \begin{matrix} (1 & 1 & \dots & 1) \end{matrix} \\ \mbox{beta} &=& \begin{matrix} (1 & 1 & \dots & 1) \end{matrix} \end{eqnarray*}

Parameters
tensor_shapeShape of tensor \(S_{x \times y \times z}\).
template<typename Scalar>
bnmf_algs::alloc_model::Params< Scalar >::Params ( )
default

Member Data Documentation

template<typename Scalar>
Scalar bnmf_algs::alloc_model::Params< Scalar >::a

Shape parameter of Gamma distribution.

template<typename Scalar>
std::vector<Scalar> bnmf_algs::alloc_model::Params< Scalar >::alpha

Parameter vector of Dirichlet prior for matrix \(W_{x \times y}\) of size \(x\).

template<typename Scalar>
Scalar bnmf_algs::alloc_model::Params< Scalar >::b

Rate parameter of Gamma distribution.

template<typename Scalar>
std::vector<Scalar> bnmf_algs::alloc_model::Params< Scalar >::beta

Parameter vector of Dirichlet prior for matrix \(H_{z \times y}\) of size \(z\).


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