libDAI
Public Member Functions | Private Attributes | List of all members
dai::MaximizationStep Class Reference

A MaximizationStep groups together several parameter estimation tasks (SharedParameters objects) into a single unit. More...

#include <dai/emalg.h>

Public Member Functions

 MaximizationStep ()
 Default constructor. More...
 
 MaximizationStep (std::vector< SharedParameters > &maximizations)
 Construct MaximizationStep from a vector of parameter estimation tasks. More...
 
 MaximizationStep (std::istream &is, const FactorGraph &fg_varlookup)
 Constructor from an input stream and a corresponding factor graph. More...
 
void addExpectations (InfAlg &alg)
 Collect the beliefs from this InfAlg as expectations for the next Maximization step. More...
 
void maximize (FactorGraph &fg)
 Using all of the currently added expectations, make new factors with maximized parameters and set them in the FactorGraph. More...
 
void clear ()
 Clear the step, to be called at the begining of each step. More...
 

Private Attributes

std::vector< SharedParameters_params
 Vector of parameter estimation tasks of which this maximization step consists. More...
 

Iterator interface

typedef std::vector< SharedParameters >::iterator iterator
 Iterator over the parameter estimation tasks. More...
 
typedef std::vector< SharedParameters >::const_iterator const_iterator
 Constant iterator over the parameter estimation tasks. More...
 
iterator begin ()
 Returns iterator that points to the first parameter estimation task. More...
 
const_iterator begin () const
 Returns constant iterator that points to the first parameter estimation task. More...
 
iterator end ()
 Returns iterator that points beyond the last parameter estimation task. More...
 
const_iterator end () const
 Returns constant iterator that points beyond the last parameter estimation task. More...
 

Detailed Description

A MaximizationStep groups together several parameter estimation tasks (SharedParameters objects) into a single unit.

Author
Charles Vaske

Member Typedef Documentation

Iterator over the parameter estimation tasks.

Constant iterator over the parameter estimation tasks.

Constructor & Destructor Documentation

dai::MaximizationStep::MaximizationStep ( )
inline

Default constructor.

dai::MaximizationStep::MaximizationStep ( std::vector< SharedParameters > &  maximizations)
inline

Construct MaximizationStep from a vector of parameter estimation tasks.

dai::MaximizationStep::MaximizationStep ( std::istream &  is,
const FactorGraph fg_varlookup 
)

Constructor from an input stream and a corresponding factor graph.

See also
Maximization Step block format

Member Function Documentation

void dai::MaximizationStep::addExpectations ( InfAlg alg)

Collect the beliefs from this InfAlg as expectations for the next Maximization step.

void dai::MaximizationStep::maximize ( FactorGraph fg)

Using all of the currently added expectations, make new factors with maximized parameters and set them in the FactorGraph.

void dai::MaximizationStep::clear ( )

Clear the step, to be called at the begining of each step.

iterator dai::MaximizationStep::begin ( )
inline

Returns iterator that points to the first parameter estimation task.

const_iterator dai::MaximizationStep::begin ( ) const
inline

Returns constant iterator that points to the first parameter estimation task.

iterator dai::MaximizationStep::end ( )
inline

Returns iterator that points beyond the last parameter estimation task.

const_iterator dai::MaximizationStep::end ( ) const
inline

Returns constant iterator that points beyond the last parameter estimation task.

Member Data Documentation

std::vector<SharedParameters> dai::MaximizationStep::_params
private

Vector of parameter estimation tasks of which this maximization step consists.


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