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

PLearn::StatsIterator Class Reference

#include <StatsIterator.h>

Inheritance diagram for PLearn::StatsIterator:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual bool requiresMultiplePasses ()
 Should return true if several passes are required (default version returns false).

virtual void init (int inputsize)=0
 Call this method once with the correct inputsize.

virtual void update (const Vec &input)=0
 Then iterate over the data set and call this method for each row.

virtual void update (const Mat &inputs)
virtual bool finish ()=0
virtual Vec getResult ()
 You can call this method after finish has returned true.

virtual void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 PLEARN_DECLARE_ABSTRACT_OBJECT (StatsIterator)
virtual void build ()
 Should call simply inherited::build(), then this class's build_().

virtual void oldwrite (ostream &out) const
virtual void oldread (istream &in)
 DEPRECATED For backward compatibility with old saved object.


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

Vec result

Private Types

typedef Object inherited

Member Typedef Documentation

typedef Object PLearn::StatsIterator::inherited [private]
 

Reimplemented from PLearn::Object.

Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.

Definition at line 60 of file StatsIterator.h.


Member Function Documentation

virtual void PLearn::StatsIterator::build  )  [inline, 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::Object.

Definition at line 97 of file StatsIterator.h.

void PLearn::StatsIterator::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::Object.

Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.

Definition at line 63 of file StatsIterator.cc.

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

virtual bool PLearn::StatsIterator::finish  )  [pure virtual]
 

Call this method when all the data has been shown (through update) If the method returns false, then a further pass through the data is required.

Implemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.

Vec PLearn::StatsIterator::getResult  )  [virtual]
 

You can call this method after finish has returned true.

Definition at line 61 of file StatsIterator.cc.

References result.

virtual void PLearn::StatsIterator::init int  inputsize  )  [pure virtual]
 

Call this method once with the correct inputsize.

Implemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.

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

Reimplemented in PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.

Definition at line 53 of file StatsIterator.cc.

References PLearn::deepCopyField(), and result.

void PLearn::StatsIterator::oldread istream &  in  )  [virtual]
 

DEPRECATED For backward compatibility with old saved object.

Reimplemented from PLearn::Object.

Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.

Definition at line 79 of file StatsIterator.cc.

References PLearn::readField(), PLearn::readFooter(), PLearn::readHeader(), and result.

void PLearn::StatsIterator::oldwrite ostream &  out  )  const [virtual]
 

Reimplemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.

Definition at line 71 of file StatsIterator.cc.

References result, PLearn::writeField(), PLearn::writeFooter(), and PLearn::writeHeader().

PLearn::StatsIterator::PLEARN_DECLARE_ABSTRACT_OBJECT StatsIterator   ) 
 

bool PLearn::StatsIterator::requiresMultiplePasses  )  [virtual]
 

Should return true if several passes are required (default version returns false).

Definition at line 59 of file StatsIterator.cc.

virtual void PLearn::StatsIterator::update const Mat inputs  )  [inline, virtual]
 

Definition at line 76 of file StatsIterator.h.

References PLearn::TMat< T >::length(), PLearn::Mat, and PLearn::update().

virtual void PLearn::StatsIterator::update const Vec input  )  [pure virtual]
 

Then iterate over the data set and call this method for each row.

Implemented in PLearn::MeanStatsIterator, PLearn::ExpMeanStatsIterator, PLearn::StddevStatsIterator, PLearn::StderrStatsIterator, PLearn::SharpeRatioStatsIterator, PLearn::MinStatsIterator, PLearn::MaxStatsIterator, PLearn::LiftStatsIterator, and PLearn::QuantilesStatsIterator.


Member Data Documentation

Vec PLearn::StatsIterator::result [protected]
 

Definition at line 63 of file StatsIterator.h.

Referenced by getResult(), makeDeepCopyFromShallowCopy(), oldread(), and oldwrite().


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