libDAI
|
Estimates the parameters of a conditional probability table, using pseudocounts. More...
#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. |
Additional Inherited Members | |
![]() | |
typedef ParameterEstimation *(* | ParamEstFactory )(const PropertySet &) |
Type of pointer to factory function. | |
![]() | |
virtual | ~ParameterEstimation () |
Virtual destructor for deleting pointers to derived classes. | |
virtual ParameterEstimation * | clone () const =0 |
Virtual copy constructor. | |
virtual Prob | estimate ()=0 |
Estimate the factor using the accumulated sufficient statistics and reset. | |
virtual void | addSufficientStatistics (const Prob &p)=0 |
Accumulate the sufficient statistics for p. | |
virtual size_t | probSize () const =0 |
Returns the size of the Prob that should be passed to addSufficientStatistics. | |
![]() | |
static ParameterEstimation * | construct (const std::string &method, const PropertySet &p) |
General factory method that constructs the desired ParameterEstimation subclass. | |
static void | registerMethod (const std::string &method, const ParamEstFactory &f) |
Register a subclass so that it can be used with construct(). |
Estimates the parameters of a conditional probability table, using 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 ![]() |
|
inlinevirtual |
Virtual destructor.
|
static |
Virtual constructor, using a PropertySet.
Some keys in the PropertySet are required. For a conditional probability ,
An optional key is:
|
inlinevirtual |
Virtual copy constructor.
|
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.
|
virtual |
Accumulate sufficient statistics from the expectations in p.
|
inlinevirtual |
Returns the required size for arguments to addSufficientStatistics().
|
private |
Number of states of the variable of interest.
|
private |
Current pseudocounts.
|
private |
Initial pseudocounts.