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

PLearn::QuantilesStatsIterator Class Reference

#include <StatsIterator.h>

Inheritance diagram for PLearn::QuantilesStatsIterator:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual string info () const
 returns a bit more informative string about object (default returns classname())

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

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

virtual bool finish ()
 QuantilesStatsIterator ()
 QuantilesStatsIterator (Vec quantiles, int n_data=1000)
 PLEARN_DECLARE_OBJECT (QuantilesStatsIterator)
virtual void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
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

int nsamples
Vec quantiles
Array< Vecdata

Private Types

typedef StatsIterator inherited

Detailed Description

result Vec has size N: the value of the observed variable at the N given quantiles.

Definition at line 326 of file StatsIterator.h.


Member Typedef Documentation

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

Reimplemented from PLearn::StatsIterator.

Definition at line 328 of file StatsIterator.h.


Constructor & Destructor Documentation

PLearn::QuantilesStatsIterator::QuantilesStatsIterator  )  [inline]
 

Definition at line 340 of file StatsIterator.h.

PLearn::QuantilesStatsIterator::QuantilesStatsIterator Vec  quantiles,
int  n_data = 1000
 

Definition at line 635 of file StatsIterator.cc.


Member Function Documentation

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

Definition at line 691 of file StatsIterator.cc.

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

bool PLearn::QuantilesStatsIterator::finish  )  [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.

Implements PLearn::StatsIterator.

Definition at line 670 of file StatsIterator.cc.

References data, PLearn::TMat< T >::fill(), PLearn::TVec< T >::length(), PLearn::TVec< Vec >::length(), PLearn::Mat, MISSING_VALUE, nsamples, quantiles, PLearn::sortElements(), and PLearn::TVec< T >::toMat().

virtual string PLearn::QuantilesStatsIterator::info  )  const [inline, virtual]
 

returns a bit more informative string about object (default returns classname())

Reimplemented from PLearn::Object.

Definition at line 336 of file StatsIterator.h.

References quantiles, and PLearn::tostring().

void PLearn::QuantilesStatsIterator::init int  inputsize  )  [virtual]
 

Call this method once with the correct inputsize.

Implements PLearn::StatsIterator.

Definition at line 640 of file StatsIterator.cc.

References data, PLearn::TVec< Vec >::length(), PLearn::TVec< T >::length(), nsamples, quantiles, PLearn::TVec< Vec >::resize(), and PLearn::Vec.

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

Reimplemented from PLearn::StatsIterator.

Definition at line 628 of file StatsIterator.cc.

References data, PLearn::deepCopyField(), and quantiles.

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

DEPRECATED For backward compatibility with old saved object.

Reimplemented from PLearn::StatsIterator.

Definition at line 711 of file StatsIterator.cc.

References nsamples, quantiles, PLearn::readField(), PLearn::readFooter(), and PLearn::readHeader().

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

Reimplemented from PLearn::StatsIterator.

Definition at line 702 of file StatsIterator.cc.

References nsamples, quantiles, PLearn::writeField(), PLearn::writeFooter(), and PLearn::writeHeader().

PLearn::QuantilesStatsIterator::PLEARN_DECLARE_OBJECT QuantilesStatsIterator   ) 
 

void PLearn::QuantilesStatsIterator::update const Vec input  )  [virtual]
 

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

Implements PLearn::StatsIterator.

Definition at line 654 of file StatsIterator.cc.

References data, PLearn::TVec< T >::length(), PLearn::TVec< Vec >::length(), and nsamples.


Member Data Documentation

Array<Vec> PLearn::QuantilesStatsIterator::data [protected]
 

Definition at line 333 of file StatsIterator.h.

Referenced by finish(), init(), makeDeepCopyFromShallowCopy(), and update().

int PLearn::QuantilesStatsIterator::nsamples [protected]
 

Definition at line 331 of file StatsIterator.h.

Referenced by finish(), init(), oldread(), oldwrite(), and update().

Vec PLearn::QuantilesStatsIterator::quantiles [protected]
 

Definition at line 332 of file StatsIterator.h.

Referenced by finish(), info(), init(), makeDeepCopyFromShallowCopy(), oldread(), and oldwrite().


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