LDA++
|
#include <SemiSupervisedEStep.hpp>
Public Member Functions | |
SemiSupervisedEStep (std::shared_ptr< EStepInterface< Scalar > > supervised_step, std::shared_ptr< EStepInterface< Scalar > > unsupervised_step) | |
std::shared_ptr< parameters::Parameters > | doc_e_step (const std::shared_ptr< corpus::Document > doc, const std::shared_ptr< parameters::Parameters > parameters) override |
void | e_step () 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) |
SemiSupervisedEStep passes a document to either a supervised step or an unsupervised step based on whether there exists class information for a given document.
SemiSupervisedEStep emits all the events emitted from the supervised or unsupervised expectation steps so one has to subscribe only to the SemiSupervisedEStep and not the steps passed in as constructor parameters.
ldaplusplus::SemiSupervisedEStep::SemiSupervisedEStep | ( | std::shared_ptr< EStepInterface< Scalar > > | supervised_step, |
std::shared_ptr< EStepInterface< Scalar > > | unsupervised_step | ||
) |
supervised_step | A pointer to a supervised expectation step |
unsupervised_step | A pointer to an unsupervised expectation step |
|
overridevirtual |
If the class from the document is less than 0 then the pass the document to the unsupervised step otherwise pass it to the supervised.
Implements ldaplusplus::em::EStepInterface< Scalar >.
|
overridevirtual |
Inform both the sub e steps that an epoch has finished.
Implements ldaplusplus::em::EStepInterface< Scalar >.