54 template <
typename T,
typename Scalar>
81 for (
const auto& sample : matrix_sampler) {
88 for (
size_t k = 0; k < z; ++k) {
89 T log_marginal_change =
94 if (log_marginal_change > curr_max) {
95 curr_max = log_marginal_change;
Structure to hold the parameters for the Allocation Model .
Definition: alloc_model_params.hpp:25
util::Generator< std::pair< int, int >, details::SampleOnesNoReplaceComputer< T > > sample_ones_noreplace(const matrix_t< T > &X)
Return a bnmf_algs::util::Generator that will generate a sequence of samples from the given matrix wi...
Definition: sampling.hpp:526
Eigen::Tensor< Scalar, N, Eigen::RowMajor > tensor_t
Tensor type used in the computations.
Definition: defs.hpp:52
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > matrix_t
Matrix type used in the computations.
Definition: defs.hpp:41
std::vector< Scalar > alpha
Parameter vector of Dirichlet prior for matrix of size .
Definition: alloc_model_params.hpp:37
tensor_t< T, 3 > seq_greedy_bld(const matrix_t< T > &X, size_t z, const alloc_model::Params< Scalar > &model_params)
Compute tensor , the solution of BLD problem , from matrix using sequential greedy method...
Definition: seq_greedy_bld.hpp:55
void check_bld_params(const matrix_t< T > &X, size_t z, const alloc_model::Params< Scalar > &model_params)
Do parameter checks on BLD computing function parameters and throw an assertion error if the paramete...
Definition: util_details.hpp:20
std::vector< Scalar > beta
Parameter vector of Dirichlet prior for matrix of size .
Definition: alloc_model_params.hpp:42
Eigen::Matrix< Scalar, 1, Eigen::Dynamic, Eigen::RowMajor > vector_t
Vector type used in the computations.
Definition: defs.hpp:27
Main namespace for bnmf-algs library.
Definition: alloc_model_funcs.hpp:12