dai::CondProbEstimation Class Reference

Estimates the parameters of a conditional probability table, using pseudocounts. More...

#include <dai/emalg.h>

Inheritance diagram for dai::CondProbEstimation:

dai::ParameterEstimation

List of all members.

Public Member Functions

 CondProbEstimation (size_t target_dimension, const Prob &pseudocounts)
 Constructor.
virtual ParameterEstimationclone () 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 ParameterEstimationfactory (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.


Detailed Description

Estimates the parameters of a conditional probability table, using pseudocounts.

Author:
Charles Vaske

Constructor & Destructor Documentation

dai::CondProbEstimation::CondProbEstimation ( size_t  target_dimension,
const Prob pseudocounts 
)

Constructor.

For a conditional probability $ P( X | Y ) $,

Parameters:
target_dimension should equal $ | X | $
pseudocounts are the initial pseudocounts, of length $ |X| \cdot |Y| $

virtual dai::CondProbEstimation::~CondProbEstimation (  )  [inline, virtual]

Virtual destructor.


Member Function Documentation

ParameterEstimation * dai::CondProbEstimation::factory ( const PropertySet p  )  [static]

Virtual constructor, using a PropertySet.

Some keys in the PropertySet are required. For a conditional probability $ P( X | Y ) $,

  • target_dimension should be equal to $ | X | $
  • total_dimension should be equal to $ |X| \cdot |Y| $

An optional key is:

  • pseudo_count which specifies the initial counts (defaults to 1)

virtual ParameterEstimation* dai::CondProbEstimation::clone (  )  const [inline, virtual]

Virtual copy constructor.

Implements dai::ParameterEstimation.

Prob dai::CondProbEstimation::estimate (  )  [virtual]

Returns an estimate of the conditional probability distribution.

The format of the resulting Prob keeps all the values for $ P(X | Y=y) $ in sequential order in the array.

Implements dai::ParameterEstimation.

void dai::CondProbEstimation::addSufficientStatistics ( const Prob p  )  [virtual]

Accumulate sufficient statistics from the expectations in p.

Implements dai::ParameterEstimation.

virtual size_t dai::CondProbEstimation::probSize (  )  const [inline, virtual]

Returns the required size for arguments to addSufficientStatistics().

Implements dai::ParameterEstimation.


Member Data Documentation

Number of states of the variable of interest.

Current pseudocounts.

Initial pseudocounts.


The documentation for this class was generated from the following files:

Generated on Thu Aug 5 19:04:05 2010 for libDAI by  doxygen 1.5.5