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

PLearn::LiftStatsIterator Class Reference

#include <StatsIterator.h>

Inheritance diagram for PLearn::LiftStatsIterator:

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

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 ()
 LiftStatsIterator (int the_index=0, real the_fraction=0.1)
 PLEARN_DECLARE_OBJECT (LiftStatsIterator)
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
int lift_index
real lift_fraction
Mat output_and_pos
Vec targets

Private Types

typedef StatsIterator inherited

Detailed Description

result Vec has size 2: result[0] = lift result[1] = lift/lift_maximum

Definition at line 291 of file StatsIterator.h.


Member Typedef Documentation

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

Reimplemented from PLearn::StatsIterator.

Definition at line 293 of file StatsIterator.h.


Constructor & Destructor Documentation

PLearn::LiftStatsIterator::LiftStatsIterator int  the_index = 0,
real  the_fraction = 0.1
 

Definition at line 520 of file StatsIterator.cc.


Member Function Documentation

void PLearn::LiftStatsIterator::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 578 of file StatsIterator.cc.

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

bool PLearn::LiftStatsIterator::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 550 of file StatsIterator.cc.

References lift_fraction, MIN, nsamples, output_and_pos, PLearn::TVec< T >::resize(), PLearn::TMat< T >::resize(), PLearn::selectAndOrder(), PLearn::TMat< T >::subMat(), PLearn::sum(), and targets.

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

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

Reimplemented from PLearn::Object.

Definition at line 303 of file StatsIterator.h.

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

Call this method once with the correct inputsize.

Implements PLearn::StatsIterator.

Definition at line 524 of file StatsIterator.cc.

References nsamples, output_and_pos, PLearn::TVec< T >::resize(), PLearn::TMat< T >::resize(), targets, and PLearn::Vec.

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

Reimplemented from PLearn::StatsIterator.

Definition at line 513 of file StatsIterator.cc.

References PLearn::deepCopyField(), output_and_pos, and targets.

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

DEPRECATED For backward compatibility with old saved object.

Reimplemented from PLearn::StatsIterator.

Definition at line 610 of file StatsIterator.cc.

References lift_fraction, lift_index, nsamples, output_and_pos, PLearn::readField(), PLearn::readFooter(), PLearn::readHeader(), and targets.

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

Reimplemented from PLearn::StatsIterator.

Definition at line 598 of file StatsIterator.cc.

References lift_fraction, lift_index, nsamples, output_and_pos, targets, PLearn::writeField(), PLearn::writeFooter(), and PLearn::writeHeader().

PLearn::LiftStatsIterator::PLEARN_DECLARE_OBJECT LiftStatsIterator   ) 
 

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

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

Implements PLearn::StatsIterator.

Definition at line 536 of file StatsIterator.cc.

References PLearn::FABS(), PLearn::TMat< T >::length(), lift_index, nsamples, output_and_pos, PLearn::TVec< T >::resize(), PLearn::TMat< T >::resize(), and targets.


Member Data Documentation

real PLearn::LiftStatsIterator::lift_fraction [protected]
 

Definition at line 298 of file StatsIterator.h.

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

int PLearn::LiftStatsIterator::lift_index [protected]
 

Definition at line 297 of file StatsIterator.h.

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

int PLearn::LiftStatsIterator::nsamples [protected]
 

Definition at line 296 of file StatsIterator.h.

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

Mat PLearn::LiftStatsIterator::output_and_pos [protected]
 

Definition at line 299 of file StatsIterator.h.

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

Vec PLearn::LiftStatsIterator::targets [protected]
 

Definition at line 300 of file StatsIterator.h.

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


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