LDA++
|
#include <EStepInterface.hpp>
Public Member Functions | |
virtual std::shared_ptr< parameters::Parameters > | doc_e_step (const std::shared_ptr< corpus::Document > doc, const std::shared_ptr< parameters::Parameters > parameters)=0 |
virtual void | e_step ()=0 |
Public Member Functions inherited from ldaplusplus::events::EventDispatcherComposition | |
std::shared_ptr< EventDispatcherInterface > | get_event_dispatcher () |
void | set_event_dispatcher (std::shared_ptr< EventDispatcherInterface > dispatcher) |
Interface that defines an E-step iteration for any LDA inference.
The expectation step maximizes the likelihood (actually the Evidence Lower Bound) of the data given constant parameters. In variational inference this is achieved by changing the free variational parameters. In classical LDA this step computes \(\phi\) and \(\gamma\) for every document given the distribution over words for all topics, usually \(\beta\) in literature.
|
pure virtual |
Maximize the ELBO.
doc | A single document |
parameters | An instance of class Parameters, which contains all necessary model parameters for e-step's implementation |
Implemented in ldaplusplus::em::CorrespondenceSupervisedEStep< Scalar >, ldaplusplus::em::FastSupervisedEStep< Scalar >, ldaplusplus::em::SupervisedEStep< Scalar >, ldaplusplus::em::UnsupervisedEStep< Scalar >, ldaplusplus::em::MultinomialSupervisedEStep< Scalar >, and ldaplusplus::em::SemiSupervisedEStep< Scalar >.
|
pure virtual |
Perform actions that should be performed once for each epoch for the whole corpus. One use of this method is so that the e steps can know which epoch they are running for.
Implemented in ldaplusplus::em::FastSupervisedEStep< Scalar >, ldaplusplus::em::SemiSupervisedEStep< Scalar >, and ldaplusplus::em::AbstractEStep< Scalar >.