1 #ifndef _LDAPLUSPLUS_EM_FASTSUPERVISEDMSTEP_HPP_ 2 #define _LDAPLUSPLUS_EM_FASTSUPERVISEDMSTEP_HPP_ 4 #include "ldaplusplus/em/UnsupervisedMStep.hpp" 44 template <
typename Scalar>
47 typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> MatrixX;
48 typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1> VectorX;
59 size_t m_step_iterations = 10,
60 Scalar m_step_tolerance = 1e-2,
61 Scalar regularization_penalty = 1e-2
62 ) : m_step_iterations_(m_step_iterations),
63 m_step_tolerance_(m_step_tolerance),
64 regularization_penalty_(regularization_penalty),
77 std::shared_ptr<parameters::Parameters> parameters
92 const std::shared_ptr<corpus::Document> doc,
93 const std::shared_ptr<parameters::Parameters> v_parameters,
94 std::shared_ptr<parameters::Parameters> m_parameters
99 size_t m_step_iterations_;
102 Scalar m_step_tolerance_;
104 Scalar regularization_penalty_;
108 MatrixX expected_z_bar_;
115 #endif // _LDAPLUSPLUS_EM_FASTSUPERVISEDMSTEP_HPP_ Definition: UnsupervisedMStep.hpp:42
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: FastSupervisedMStep.cpp:15
FastSupervisedMStep(size_t m_step_iterations=10, Scalar m_step_tolerance=1e-2, Scalar regularization_penalty=1e-2)
Definition: FastSupervisedMStep.hpp:58
virtual void m_step(std::shared_ptr< parameters::Parameters > parameters) override
Definition: FastSupervisedMStep.cpp:56
Definition: Document.hpp:11
Definition: FastSupervisedMStep.hpp:45