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. More... | |
virtual ParameterEstimation * | clone () const |
Virtual copy constructor. More... | |
virtual | ~CondProbEstimation () |
Virtual destructor. More... | |
virtual Prob | parameters (const Prob &p) |
Returns an estimate of the conditional probability distribution. More... | |
virtual Prob | parametersToFactor (const Prob &p) |
Convert a set of estimated parameters to a factor. More... | |
virtual size_t | probSize () const |
Returns the required size for arguments to estimate(). More... | |
virtual const std::string & | name () const |
virtual const PropertySet & | properties () const |
Static Public Member Functions | |
static ParameterEstimation * | factory (const PropertySet &p) |
Virtual constructor, using a PropertySet. More... | |
Private Attributes | |
size_t | _target_dim |
Number of states of the variable of interest. More... | |
Prob | _initial_stats |
Initial pseudocounts. More... | |
PropertySet | _props |
PropertySet that allows reconstruction of this estimator. More... | |
Static Private Attributes | |
static std::string | _name = "CondProbEstimation" |
Additional Inherited Members | |
Private Types inherited from dai::ParameterEstimation | |
typedef ParameterEstimation *(* | ParamEstFactory) (const PropertySet &) |
Type of pointer to factory function. More... | |
Private Member Functions inherited from dai::ParameterEstimation | |
virtual | ~ParameterEstimation () |
Virtual destructor for deleting pointers to derived classes. More... | |
virtual Prob | estimate (const Prob &p) |
Estimate the factor using the provided expectations. More... | |
Static Private Member Functions inherited from dai::ParameterEstimation | |
static ParameterEstimation * | construct (const std::string &method, const PropertySet &p) |
General factory method that constructs the desired ParameterEstimation subclass. More... | |
static void | registerMethod (const std::string &method, const ParamEstFactory &f) |
Register a subclass so that it can be used with construct(). More... | |
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.
Implements dai::ParameterEstimation.
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.
Convert a set of estimated parameters to a factor.
Implements dai::ParameterEstimation.
|
inlinevirtual |
Returns the required size for arguments to estimate().
Implements dai::ParameterEstimation.
|
private |
Number of states of the variable of interest.
|
private |
Initial pseudocounts.
|
private |
PropertySet that allows reconstruction of this estimator.