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

PLearn::PLogPVariable Class Reference

returns the elementwise x*log(x) in a (hopefully!) numerically stable way This can be used to compute the Entropy for instance More...

#include <PLogPVariable.h>

Inheritance diagram for PLearn::PLogPVariable:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PLogPVariable ()
 Default constructor for persistence.

 PLogPVariable (Variable *input)
 PLEARN_DECLARE_OBJECT (PLogPVariable)
virtual void recomputeSize (int &l, int &w) const
 Recomputes the length l and width w that this variable should have, according to its parent variables.

virtual void fprop ()
 compute output given input

virtual void bprop ()
virtual void symbolicBprop ()
 compute a piece of new Var graph that represents the symbolic derivative of this Var


Private Types

typedef UnaryVariable inherited

Detailed Description

returns the elementwise x*log(x) in a (hopefully!) numerically stable way This can be used to compute the Entropy for instance

Definition at line 54 of file PLogPVariable.h.


Member Typedef Documentation

typedef UnaryVariable PLearn::PLogPVariable::inherited [private]
 

Reimplemented from PLearn::UnaryVariable.

Definition at line 56 of file PLogPVariable.h.

Referenced by PLogPVariable().


Constructor & Destructor Documentation

PLearn::PLogPVariable::PLogPVariable  )  [inline]
 

Default constructor for persistence.

Definition at line 60 of file PLogPVariable.h.

PLearn::PLogPVariable::PLogPVariable Variable input  ) 
 

Definition at line 57 of file PLogPVariable.cc.

References inherited.


Member Function Documentation

void PLearn::PLogPVariable::bprop  )  [virtual]
 

Implements PLearn::Variable.

Definition at line 83 of file PLogPVariable.cc.

References PLearn::Variable::nelems(), and PLearn::safeflog().

void PLearn::PLogPVariable::fprop  )  [virtual]
 

compute output given input

Implements PLearn::Variable.

Definition at line 71 of file PLogPVariable.cc.

References PLearn::Variable::nelems(), and PLearn::safeflog().

PLearn::PLogPVariable::PLEARN_DECLARE_OBJECT PLogPVariable   ) 
 

void PLearn::PLogPVariable::recomputeSize int l,
int w
const [virtual]
 

Recomputes the length l and width w that this variable should have, according to its parent variables.

This is used for ex. by sizeprop() The default version stupidly returns the current dimensions, so make sure to overload it in subclasses if this is not appropriate.

Reimplemented from PLearn::Variable.

Definition at line 62 of file PLogPVariable.cc.

References PLearn::Var::length(), and PLearn::Var::width().

void PLearn::PLogPVariable::symbolicBprop  )  [virtual]
 

compute a piece of new Var graph that represents the symbolic derivative of this Var

Reimplemented from PLearn::Variable.

Definition at line 95 of file PLogPVariable.cc.

References PLearn::log().


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