#include <dai/emalg.h>
Public Member Functions | |
CondProbEstimation (size_t target_dimension, const Prob &pseudocounts) | |
Constructor. | |
virtual ParameterEstimation * | clone () const |
Virtual copy constructor. | |
virtual | ~CondProbEstimation () |
Virtual destructor. | |
virtual Prob | estimate () |
Returns an estimate of the conditional probability distribution. | |
virtual void | addSufficientStatistics (const Prob &p) |
Accumulate sufficient statistics from the expectations in p. | |
virtual size_t | probSize () const |
Returns the required size for arguments to addSufficientStatistics(). | |
Static Public Member Functions | |
static ParameterEstimation * | factory (const PropertySet &p) |
Virtual constructor, using a PropertySet. | |
Private Attributes | |
size_t | _target_dim |
Number of states of the variable of interest. | |
Prob | _stats |
Current pseudocounts. | |
Prob | _initial_stats |
Initial pseudocounts. |
dai::CondProbEstimation::CondProbEstimation | ( | size_t | target_dimension, | |
const Prob & | pseudocounts | |||
) |
Constructor.
For a conditional probability ,
target_dimension | should equal ![]() | |
pseudocounts | are the initial pseudocounts, of length ![]() |
virtual dai::CondProbEstimation::~CondProbEstimation | ( | ) | [inline, virtual] |
Virtual destructor.
ParameterEstimation * dai::CondProbEstimation::factory | ( | const PropertySet & | p | ) | [static] |
Virtual constructor, using a PropertySet.
Some keys in the PropertySet are required. For a conditional probability ,
An optional key is:
virtual ParameterEstimation* dai::CondProbEstimation::clone | ( | ) | const [inline, virtual] |
Prob dai::CondProbEstimation::estimate | ( | ) | [virtual] |
Returns an estimate of the conditional probability distribution.
The format of the resulting Prob keeps all the values for in sequential order in the array.
Implements dai::ParameterEstimation.
void dai::CondProbEstimation::addSufficientStatistics | ( | const Prob & | p | ) | [virtual] |
virtual size_t dai::CondProbEstimation::probSize | ( | ) | const [inline, virtual] |
Returns the required size for arguments to addSufficientStatistics().
Implements dai::ParameterEstimation.
size_t dai::CondProbEstimation::_target_dim [private] |
Number of states of the variable of interest.
Prob dai::CondProbEstimation::_stats [private] |
Current pseudocounts.
Prob dai::CondProbEstimation::_initial_stats [private] |
Initial pseudocounts.