Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::ConditionalGaussianDistribution Class Reference

#include <ConditionalGaussianDistribution.h>

Inheritance diagram for PLearn::ConditionalGaussianDistribution:

Inheritance graph
[legend]
Collaboration diagram for PLearn::ConditionalGaussianDistribution:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ConditionalDistribution inherited

Public Member Functions

 ConditionalGaussianDistribution ()
virtual void build ()
 **** SUBCLASS WRITING: **** This method should be redefined in subclasses, to just call inherited::build() and then build_()

virtual void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 Transforms a shallow copy into a deep copy.

 PLEARN_DECLARE_OBJECT (ConditionalGaussianDistribution)
 Declares name and deepCopy methods.

virtual void train (VMat training_set)
 trains the model

virtual double log_density (const Vec &x) const
 return log of probability density log(p(x))

virtual double density (const Vec &x) const
 return probability density p(x) [ default version returns exp(log_density(x)) ]

virtual double survival_fn (const Vec &x) const
 return survival fn = P(X>x)

virtual double cdf (const Vec &x) const
 return survival fn = P(X<x)

virtual Vec expectation () const
 return E[X]

virtual Mat variance () const
 return Var[X]

virtual void generate (Vec &x) const
 return a pseudo-random sample generated from the distribution.

virtual void setInput (const Vec &input)
 Set the input part before using the inherited methods.


Public Attributes

Vec mean
Mat covariance

Static Protected Member Functions

void declareOptions (OptionList &ol)
 Declares this class' options.


Member Typedef Documentation

typedef ConditionalDistribution PLearn::ConditionalGaussianDistribution::inherited
 

Reimplemented from PLearn::ConditionalDistribution.

Definition at line 55 of file ConditionalGaussianDistribution.h.

Referenced by ConditionalGaussianDistribution().


Constructor & Destructor Documentation

PLearn::ConditionalGaussianDistribution::ConditionalGaussianDistribution  ) 
 

Definition at line 47 of file ConditionalGaussianDistribution.cc.

References inherited.


Member Function Documentation

void PLearn::ConditionalGaussianDistribution::build  )  [virtual]
 

**** SUBCLASS WRITING: **** This method should be redefined in subclasses, to just call inherited::build() and then build_()

Reimplemented from PLearn::Distribution.

Definition at line 77 of file ConditionalGaussianDistribution.cc.

double PLearn::ConditionalGaussianDistribution::cdf const Vec x  )  const [virtual]
 

return survival fn = P(X<x)

Reimplemented from PLearn::Distribution.

Definition at line 104 of file ConditionalGaussianDistribution.cc.

References PLERROR.

void PLearn::ConditionalGaussianDistribution::declareOptions OptionList ol  )  [static, protected]
 

Declares this class' options.

Reimplemented from PLearn::Distribution.

Definition at line 57 of file ConditionalGaussianDistribution.cc.

References PLearn::declareOption(), and PLearn::OptionList.

double PLearn::ConditionalGaussianDistribution::density const Vec x  )  const [virtual]
 

return probability density p(x) [ default version returns exp(log_density(x)) ]

Reimplemented from PLearn::Distribution.

Definition at line 98 of file ConditionalGaussianDistribution.cc.

References PLearn::exp(), log_density(), and x.

Vec PLearn::ConditionalGaussianDistribution::expectation  )  const [virtual]
 

return E[X]

Reimplemented from PLearn::Distribution.

Definition at line 107 of file ConditionalGaussianDistribution.cc.

References mean.

void PLearn::ConditionalGaussianDistribution::generate Vec x  )  const [virtual]
 

return a pseudo-random sample generated from the distribution.

Reimplemented from PLearn::Distribution.

Definition at line 117 of file ConditionalGaussianDistribution.cc.

References covariance, mean, PLearn::multivariate_normal(), PLERROR, and x.

double PLearn::ConditionalGaussianDistribution::log_density const Vec x  )  const [virtual]
 

return log of probability density log(p(x))

Reimplemented from PLearn::Distribution.

Definition at line 95 of file ConditionalGaussianDistribution.cc.

References PLERROR.

Referenced by density().

void PLearn::ConditionalGaussianDistribution::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  )  [virtual]
 

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::ConditionalDistribution.

Definition at line 90 of file ConditionalGaussianDistribution.cc.

PLearn::ConditionalGaussianDistribution::PLEARN_DECLARE_OBJECT ConditionalGaussianDistribution   ) 
 

Declares name and deepCopy methods.

void PLearn::ConditionalGaussianDistribution::setInput const Vec input  )  [virtual]
 

Set the input part before using the inherited methods.

Reimplemented from PLearn::ConditionalDistribution.

Definition at line 128 of file ConditionalGaussianDistribution.cc.

References mean, PLearn::TVec< T >::resize(), and PLearn::TVec< T >::size().

double PLearn::ConditionalGaussianDistribution::survival_fn const Vec x  )  const [virtual]
 

return survival fn = P(X>x)

Reimplemented from PLearn::Distribution.

Definition at line 101 of file ConditionalGaussianDistribution.cc.

References PLERROR.

void PLearn::ConditionalGaussianDistribution::train VMat  training_set  )  [virtual]
 

trains the model

Reimplemented from PLearn::Distribution.

Definition at line 83 of file ConditionalGaussianDistribution.cc.

References PLearn::computeMeanAndCovar(), covariance, mean, PLearn::TMat< T >::resize(), PLearn::TVec< T >::resize(), and PLearn::VMat::width().

Mat PLearn::ConditionalGaussianDistribution::variance  )  const [virtual]
 

return Var[X]

Reimplemented from PLearn::Distribution.

Definition at line 112 of file ConditionalGaussianDistribution.cc.

References covariance.


Member Data Documentation

Mat PLearn::ConditionalGaussianDistribution::covariance
 

Definition at line 53 of file ConditionalGaussianDistribution.h.

Referenced by generate(), train(), and variance().

Vec PLearn::ConditionalGaussianDistribution::mean
 

Definition at line 52 of file ConditionalGaussianDistribution.h.

Referenced by expectation(), generate(), setInput(), and train().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:27:11 2004 for PLearn by doxygen 1.3.7