libDAI
|
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... | |
A MaximizationStep groups together several parameter estimation tasks (SharedParameters objects) into a single unit.
typedef std::vector<SharedParameters>::iterator dai::MaximizationStep::iterator |
Iterator over the parameter estimation tasks.
typedef std::vector<SharedParameters>::const_iterator dai::MaximizationStep::const_iterator |
Constant iterator over the parameter estimation tasks.
|
inline |
Default constructor.
|
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.
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.
|
inline |
Returns iterator that points to the first parameter estimation task.
|
inline |
Returns constant iterator that points to the first parameter estimation task.
|
inline |
Returns iterator that points beyond the last parameter estimation task.
|
inline |
Returns constant iterator that points beyond the last parameter estimation task.
|
private |
Vector of parameter estimation tasks of which this maximization step consists.