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

PLearn::FunctionalRandomVariable Class Reference

#include <RandomVar.h>

Inheritance diagram for PLearn::FunctionalRandomVariable:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FunctionalRandomVariable (int length)
 FunctionalRandomVariable *.

 FunctionalRandomVariable (int length, int width)
 FunctionalRandomVariable (const Vec &the_value)
 FunctionalRandomVariable (const Mat &the_value)
 FunctionalRandomVariable (const Var &the_value)
 FunctionalRandomVariable (const RVArray &parents, int length)
 FunctionalRandomVariable (const RVArray &parents, int length, int width)
virtual Var logP (const Var &obs, const RVInstanceArray &RHS, RVInstanceArray *parameters_to_learn)
 redefine RandomVariable functions

bool isNonRandom ()
 a Functional RV may be non-random if all its ancestors are non-random

virtual bool isDiscrete ()
 default is that the RV is discrete if all its parents are discrete

virtual bool invertible (const Var &obs, RVInstanceArray &unobserved_parents, Var **JacobianCorrection)
 !< SUBCLASS WRITERS: IMPLEMENT FUNCTIONS BELOW //!<

virtual void setValueFromParentsValue ()=0
 set the field value from the values of the parents


Detailed Description

A FunctionalRandomVariable represents a RV that is a deterministic function of other RVs, e.g., the sum, mixture, product, exponential, etc... of parent RVs.

Definition at line 1006 of file RandomVar.h.


Constructor & Destructor Documentation

PLearn::FunctionalRandomVariable::FunctionalRandomVariable int  thelength  ) 
 

FunctionalRandomVariable *.

Definition at line 976 of file RandomVar.cc.

PLearn::FunctionalRandomVariable::FunctionalRandomVariable int  length,
int  width
 

Definition at line 978 of file RandomVar.cc.

PLearn::FunctionalRandomVariable::FunctionalRandomVariable const Vec the_value  ) 
 

Definition at line 980 of file RandomVar.cc.

References PLearn::Vec.

PLearn::FunctionalRandomVariable::FunctionalRandomVariable const Mat the_value  ) 
 

Definition at line 982 of file RandomVar.cc.

References PLearn::Mat.

PLearn::FunctionalRandomVariable::FunctionalRandomVariable const Var the_value  ) 
 

Definition at line 984 of file RandomVar.cc.

PLearn::FunctionalRandomVariable::FunctionalRandomVariable const RVArray parents,
int  length
 

Definition at line 988 of file RandomVar.cc.

PLearn::FunctionalRandomVariable::FunctionalRandomVariable const RVArray parents,
int  length,
int  width
 

Definition at line 992 of file RandomVar.cc.


Member Function Documentation

bool PLearn::FunctionalRandomVariable::invertible const Var obs,
RVInstanceArray unobserved_parents,
Var **  JacobianCorrection
[virtual]
 

!< SUBCLASS WRITERS: IMPLEMENT FUNCTIONS BELOW //!<

check whether it is possible to invert the function which maps the given unobserved parents to the observed value of the RV (obs). If invertible, do the inversion, and set the value fields of the RVInstances to Var's which are functionally dependent on obs. If the absolute value of the Jacobian of the map from the unobserved parents to this R.V.'s value is different from 1, then JacobianCorrection should point to a Var that is the logarithm of the determinant of this Jacobian (first derivatives) matrix. If the function is not invertible but it is possible to write P(Y==obs | unobserved_parents) in terms of the unobserved_parents logP functions, then the sub-class writer should instead redefine the logP function appropriately.

Reimplemented in PLearn::NonRandomVariable, PLearn::JointRandomVariable, PLearn::RandomElementOfRandomVariable, PLearn::NegRandomVariable, PLearn::ExpRandomVariable, PLearn::LogRandomVariable, PLearn::PlusRandomVariable, PLearn::MinusRandomVariable, PLearn::ElementWiseDivisionRandomVariable, PLearn::ProductRandomVariable, PLearn::SubVecRandomVariable, PLearn::ExtendedRandomVariable, and PLearn::ConcatColumnsRandomVariable.

Definition at line 1051 of file RandomVar.cc.

References PLERROR.

Referenced by logP().

bool PLearn::FunctionalRandomVariable::isDiscrete  )  [virtual]
 

default is that the RV is discrete if all its parents are discrete

Implements PLearn::RandomVariable.

Definition at line 1074 of file RandomVar.cc.

References PLearn::TVec< RandomVar >::size().

Referenced by logP().

bool PLearn::FunctionalRandomVariable::isNonRandom  )  [virtual]
 

a Functional RV may be non-random if all its ancestors are non-random

Implements PLearn::RandomVariable.

Definition at line 1066 of file RandomVar.cc.

References PLearn::TVec< RandomVar >::size().

Var PLearn::FunctionalRandomVariable::logP const Var obs,
const RVInstanceArray RHS,
RVInstanceArray parameters_to_learn
[virtual]
 

redefine RandomVariable functions

Implements PLearn::RandomVariable.

Reimplemented in PLearn::RVArrayRandomElementRandomVariable.

Definition at line 996 of file RandomVar.cc.

References invertible(), isDiscrete(), PLearn::isequal(), PLearn::RandomVariable::length(), PLearn::logP(), PLearn::marginalize(), PLearn::RVInstanceArray::random_variables(), PLearn::TVec< RVInstance >::size(), PLearn::TVec< RandomVar >::size(), and PLearn::RVInstanceArray::sort().

virtual void PLearn::FunctionalRandomVariable::setValueFromParentsValue  )  [pure virtual]
 

set the field value from the values of the parents

Implements PLearn::RandomVariable.

Implemented in PLearn::NonRandomVariable, PLearn::JointRandomVariable, PLearn::RandomElementOfRandomVariable, PLearn::RVArrayRandomElementRandomVariable, PLearn::NegRandomVariable, PLearn::ExpRandomVariable, PLearn::LogRandomVariable, PLearn::PlusRandomVariable, PLearn::MinusRandomVariable, PLearn::ElementWiseDivisionRandomVariable, PLearn::ProductRandomVariable, PLearn::SubVecRandomVariable, PLearn::ExtendedRandomVariable, and PLearn::ConcatColumnsRandomVariable.


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