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.
 MaximizationStep (std::vector< SharedParameters > &maximizations)
 Construct MaximizationStep from a vector of parameter estimation tasks.
 MaximizationStep (std::istream &is, const FactorGraph &fg_varlookup)
 Constructor from an input stream and a corresponding factor graph.
void addExpectations (InfAlg &alg)
 Collect the beliefs from this InfAlg as expectations for the next Maximization step.
void maximize (FactorGraph &fg)
 Using all of the currently added expectations, make new factors with maximized parameters and set them in the FactorGraph.

Private Attributes

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

Iterator interface

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

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.

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: