LDA++
Public Member Functions | List of all members
ldaplusplus::em::SemiSupervisedEStep< Scalar > Class Template Reference

#include <SemiSupervisedEStep.hpp>

Inheritance diagram for ldaplusplus::em::SemiSupervisedEStep< Scalar >:
ldaplusplus::em::EStepInterface< Scalar > ldaplusplus::events::EventDispatcherComposition

Public Member Functions

 SemiSupervisedEStep (std::shared_ptr< EStepInterface< Scalar > > supervised_step, std::shared_ptr< EStepInterface< Scalar > > unsupervised_step)
 
std::shared_ptr< parameters::Parametersdoc_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< EventDispatcherInterfaceget_event_dispatcher ()
 
void set_event_dispatcher (std::shared_ptr< EventDispatcherInterface > dispatcher)
 

Detailed Description

template<typename Scalar>
class ldaplusplus::em::SemiSupervisedEStep< Scalar >

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.

Constructor & Destructor Documentation

template<typename Scalar >
ldaplusplus::SemiSupervisedEStep::SemiSupervisedEStep ( std::shared_ptr< EStepInterface< Scalar > >  supervised_step,
std::shared_ptr< EStepInterface< Scalar > >  unsupervised_step 
)
Parameters
supervised_stepA pointer to a supervised expectation step
unsupervised_stepA pointer to an unsupervised expectation step

Member Function Documentation

template<typename Scalar >
std::shared_ptr< parameters::Parameters > ldaplusplus::SemiSupervisedEStep::doc_e_step ( const std::shared_ptr< corpus::Document doc,
const std::shared_ptr< parameters::Parameters parameters 
)
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 >.

template<typename Scalar >
void ldaplusplus::SemiSupervisedEStep::e_step ( )
overridevirtual

Inform both the sub e steps that an epoch has finished.

Implements ldaplusplus::em::EStepInterface< Scalar >.


The documentation for this class was generated from the following files: