1 #ifndef _LDAPLUSPLUS_EM_SUPERVISEDMSTEP_HPP_ 2 #define _LDAPLUSPLUS_EM_SUPERVISEDMSTEP_HPP_ 6 #include "ldaplusplus/em/UnsupervisedMStep.hpp" 39 template <
typename Scalar>
42 typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> MatrixX;
43 typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1> VectorX;
54 size_t m_step_iterations = 10,
55 Scalar m_step_tolerance = 1e-2,
56 Scalar regularization_penalty = 1e-2
57 ) : m_step_iterations_(m_step_iterations),
58 m_step_tolerance_(m_step_tolerance),
59 regularization_penalty_(regularization_penalty),
72 std::shared_ptr<parameters::Parameters> parameters
87 const std::shared_ptr<corpus::Document> doc,
88 const std::shared_ptr<parameters::Parameters> v_parameters,
89 std::shared_ptr<parameters::Parameters> m_parameters
94 size_t m_step_iterations_;
97 Scalar m_step_tolerance_;
99 Scalar regularization_penalty_;
104 MatrixX expected_z_bar_;
105 std::vector<MatrixX> variance_z_bar_;
112 #endif // _LDAPLUSPLUS_EM_SUPERVISEDMSTEP_HPP_ Definition: UnsupervisedMStep.hpp:42
virtual void m_step(std::shared_ptr< parameters::Parameters > parameters) override
Definition: SupervisedMStep.cpp:84
virtual void doc_m_step(const std::shared_ptr< corpus::Document > doc, const std::shared_ptr< parameters::Parameters > v_parameters, std::shared_ptr< parameters::Parameters > m_parameters) override
Definition: SupervisedMStep.cpp:16
SupervisedMStep(size_t m_step_iterations=10, Scalar m_step_tolerance=1e-2, Scalar regularization_penalty=1e-2)
Definition: SupervisedMStep.hpp:53
Definition: SupervisedMStep.hpp:40
Definition: Document.hpp:11