LDA++
|
#include <CorrespondenceSupervisedMStep.hpp>
Public Member Functions | |
CorrespondenceSupervisedMStep (Scalar mu=2.) | |
virtual void | m_step (std::shared_ptr< parameters::Parameters > parameters) override |
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 |
Public Member Functions inherited from ldaplusplus::events::EventDispatcherComposition | |
std::shared_ptr< EventDispatcherInterface > | get_event_dispatcher () |
void | set_event_dispatcher (std::shared_ptr< EventDispatcherInterface > dispatcher) |
CorrespondenceSupervisedMStep implements the maximization step of a variant of the correspondence LDA model.
This model implements the correspondence LDA but instead of labels it tries to also generate the class of the document. The generative procedure is the following:
|
overridevirtual |
Count the occurences of every word and class to implement maximum likelihood estimation in the m_step()
doc | A single document |
v_parameters | The variational parameters used in m-step in order to maximize model parameters |
m_parameters | Model parameters, used as output in case of online methods |
Implements ldaplusplus::em::MStepInterface< Scalar >.
|
overridevirtual |
Maximize the ELBO w.r.t. to \(\beta\) and \(\eta\) (the topics and class generating multinomials).
parameters | Model parameters (maybe changed after call) |
Implements ldaplusplus::em::MStepInterface< Scalar >.