LDA++
ldaplusplus::em::EStepInterface< Scalar > Class Template Referenceabstract

#include <EStepInterface.hpp>

Inheritance diagram for ldaplusplus::em::EStepInterface< Scalar >:

## Public Member Functions

virtual std::shared_ptr< parameters::Parametersdoc_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< EventDispatcherInterfaceget_event_dispatcher ()

void set_event_dispatcher (std::shared_ptr< EventDispatcherInterface > dispatcher)

## Detailed Description

### template<typename Scalar> class ldaplusplus::em::EStepInterface< Scalar >

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.

## Member Function Documentation

template<typename Scalar >
 virtual std::shared_ptr ldaplusplus::em::EStepInterface< Scalar >::doc_e_step ( const std::shared_ptr< corpus::Document > doc, const std::shared_ptr< parameters::Parameters > parameters )
pure virtual

Maximize the ELBO.

Parameters
 doc A single document parameters An instance of class Parameters, which contains all necessary model parameters for e-step's implementation
Returns
The variational parameters for the current model, after e-step is completed
template<typename Scalar >
 virtual void ldaplusplus::em::EStepInterface< Scalar >::e_step ( )
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.

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