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

PLearn::UniformizeVMatrix Class Reference

#include <UniformizeVMatrix.h>

Inheritance diagram for PLearn::UniformizeVMatrix:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UniformizeVMatrix ()
 default constructor (for automatic deserialization)

 UniformizeVMatrix (VMat the_distr, Mat the_bins, Vec the_index, real the_a=0.0, real the_b=1.0)
 The original VMFields are copied upon construction.

 PLEARN_DECLARE_OBJECT (UniformizeVMatrix)
virtual void build ()
 Should call simply inherited::build(), then this class's build_().

virtual void reset_dimensions ()
 in case the dimensions of an underlying vmat has changed, recompute it


Protected Member Functions

virtual void getNewRow (int i, const Vec &v) const
 This is the only method requiring implementation in subclasses.


Static Protected Member Functions

void declareOptions (OptionList &ol)
 redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)


Protected Attributes

VMat distr
Mat bins
Vec index
real a
real b

Private Types

typedef RowBufferedVMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Detailed Description

VMatrix that can be used to uniformize (between a and b) each feature in index of the underlying distribution such that: P(x') = .5 if a < x'< b = 0 otherwise

We suppose that the original distribution of x, P(x), could be anything, and we map "a" with bins[0] and "b" with bins[N-1].

Definition at line 62 of file UniformizeVMatrix.h.


Member Typedef Documentation

typedef RowBufferedVMatrix PLearn::UniformizeVMatrix::inherited [private]
 

Reimplemented from PLearn::RowBufferedVMatrix.

Definition at line 64 of file UniformizeVMatrix.h.

Referenced by UniformizeVMatrix().


Constructor & Destructor Documentation

PLearn::UniformizeVMatrix::UniformizeVMatrix  ) 
 

default constructor (for automatic deserialization)

Definition at line 51 of file UniformizeVMatrix.cc.

PLearn::UniformizeVMatrix::UniformizeVMatrix VMat  the_distr,
Mat  the_bins,
Vec  the_index,
real  the_a = 0.0,
real  the_b = 1.0
 

The original VMFields are copied upon construction.

Definition at line 56 of file UniformizeVMatrix.cc.

References build(), inherited, PLearn::Mat, and PLearn::Vec.


Member Function Documentation

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

Should call simply inherited::build(), then this class's build_().

This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.

Reimplemented from PLearn::VMatrix.

Definition at line 65 of file UniformizeVMatrix.cc.

References build_().

Referenced by UniformizeVMatrix().

void PLearn::UniformizeVMatrix::build_  )  [private]
 

This does the actual building.

Reimplemented from PLearn::VMatrix.

Definition at line 72 of file UniformizeVMatrix.cc.

References a, b, bins, distr, index, PLearn::VMat::length(), PLearn::TMat< T >::length(), PLearn::TVec< T >::length(), PLearn::max(), PLearn::min(), and PLERROR.

Referenced by build().

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

redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)

ex: static void declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "the size of the input\n it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "the learnt model weights"); inherited::declareOptions(ol); }

Reimplemented from PLearn::VMatrix.

Definition at line 88 of file UniformizeVMatrix.cc.

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

void PLearn::UniformizeVMatrix::getNewRow int  i,
const Vec v
const [protected, virtual]
 

This is the only method requiring implementation in subclasses.

Implements PLearn::RowBufferedVMatrix.

Definition at line 98 of file UniformizeVMatrix.cc.

References a, b, bins, distr, PLearn::estimatedCumProb(), index, PLearn::TVec< T >::length(), PLearn::VMatrix::length(), PLERROR, PLearn::vec_find(), and PLearn::VMatrix::width().

PLearn::UniformizeVMatrix::PLEARN_DECLARE_OBJECT UniformizeVMatrix   ) 
 

virtual void PLearn::UniformizeVMatrix::reset_dimensions  )  [inline, virtual]
 

in case the dimensions of an underlying vmat has changed, recompute it

Reimplemented from PLearn::VMatrix.

Definition at line 94 of file UniformizeVMatrix.h.

References distr, PLearn::VMat::length(), and PLearn::VMat::width().


Member Data Documentation

real PLearn::UniformizeVMatrix::a [protected]
 

Definition at line 70 of file UniformizeVMatrix.h.

Referenced by build_(), and getNewRow().

real PLearn::UniformizeVMatrix::b [protected]
 

Definition at line 71 of file UniformizeVMatrix.h.

Referenced by build_(), and getNewRow().

Mat PLearn::UniformizeVMatrix::bins [protected]
 

Definition at line 68 of file UniformizeVMatrix.h.

Referenced by build_(), and getNewRow().

VMat PLearn::UniformizeVMatrix::distr [protected]
 

Definition at line 67 of file UniformizeVMatrix.h.

Referenced by build_(), getNewRow(), and reset_dimensions().

Vec PLearn::UniformizeVMatrix::index [protected]
 

Definition at line 69 of file UniformizeVMatrix.h.

Referenced by build_(), and getNewRow().


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