7 namespace alloc_model {
25 template <
typename Scalar>
struct Params {
57 : a(a), b(b), alpha(alpha), beta(beta) {}
79 : a(static_cast<Scalar>(1)), b(static_cast<Scalar>(10)),
80 alpha(tensor_shape[0], static_cast<Scalar>(1)),
81 beta(tensor_shape[2], static_cast<Scalar>(1)) {}
96 template <
typename Scalar>
116 template <
typename Scalar>
Structure to hold the parameters for the Allocation Model .
Definition: alloc_model_params.hpp:25
Eigen::array< size_t, N > shape
Shape of vectors, matrices, tensors, etc.
Definition: defs.hpp:66
std::vector< Params< Scalar > > make_EM_params(const shape< 3 > &tensor_shape)
Make default EM solver parameters.
Definition: alloc_model_params.hpp:117
Params(const shape< 3 > &tensor_shape)
Construct Params with the default distribution parameters according to the given tensor shape...
Definition: alloc_model_params.hpp:78
std::vector< Scalar > alpha
Parameter vector of Dirichlet prior for matrix of size .
Definition: alloc_model_params.hpp:37
Params< Scalar > make_bld_params(const shape< 3 > &tensor_shape)
Make default BLD solver parameters.
Definition: alloc_model_params.hpp:97
Scalar a
Shape parameter of Gamma distribution.
Definition: alloc_model_params.hpp:28
Scalar b
Rate parameter of Gamma distribution.
Definition: alloc_model_params.hpp:32
Params(Scalar a, Scalar b, const std::vector< Scalar > &alpha, const std::vector< Scalar > &beta)
Construct Params manually with the given distribution parameters.
Definition: alloc_model_params.hpp:55
std::vector< Scalar > beta
Parameter vector of Dirichlet prior for matrix of size .
Definition: alloc_model_params.hpp:42
Main namespace for bnmf-algs library.
Definition: alloc_model_funcs.hpp:12