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

PLearn::RepeatSplitter Class Reference

#include <RepeatSplitter.h>

Inheritance diagram for PLearn::RepeatSplitter:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RepeatSplitter ()
virtual void setDataSet (VMat the_dataset)
 Set the dataset on which the splits are to be based.

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

virtual void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 Transforms a shallow copy into a deep copy.

 PLEARN_DECLARE_OBJECT (RepeatSplitter)
 Declares name and deepCopy methods.

virtual int nsplits () const
 Returns the number of available different "splits".

virtual int nSetsPerSplit () const
 Returns the number of sets per split.

virtual TVec< VMatgetSplit (int i=0)
 Returns split number i.


Public Attributes

bool do_not_shuffle_first
real force_proportion
int n
long seed
int shuffle
PP< Splitterto_repeat

Static Protected Member Functions

void declareOptions (OptionList &ol)
 Declares this class' options.


Protected Attributes

TMat< intindices
 A matrix where the i-th row is the vector of the indices of the i-th shuffled matrix (used only when shuffle = 1).

int last_n
 Used to know if we need to reshuffle the matrix.


Private Types

typedef Splitter inherited

Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

typedef Splitter PLearn::RepeatSplitter::inherited [private]
 

Reimplemented from PLearn::Splitter.

Definition at line 51 of file RepeatSplitter.h.


Constructor & Destructor Documentation

PLearn::RepeatSplitter::RepeatSplitter  ) 
 

Definition at line 51 of file RepeatSplitter.cc.

References PLearn::seed(), and PLearn::shuffle().


Member Function Documentation

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

Definition at line 101 of file RepeatSplitter.cc.

References build_().

Referenced by setDataSet().

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

This does the actual building.

Reimplemented from PLearn::Object.

Definition at line 110 of file RepeatSplitter.cc.

References PLearn::abs(), count, do_not_shuffle_first, PLearn::StatsCollector::finalize(), force_proportion, PLearn::StatsCollector::getCounts(), indices, k, last_n, PLearn::TVec< T >::length(), PLearn::VMat::length(), PLearn::manual_seed(), n, nsplits(), PLERROR, PLWARNING, PLearn::seed(), seed, shuffle, PLearn::shuffleElements(), PLearn::uniform_sample(), and PLearn::StatsCollector::update().

Referenced by build().

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

Declares this class' options.

Reimplemented from PLearn::Object.

Definition at line 70 of file RepeatSplitter.cc.

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

TVec< VMat > PLearn::RepeatSplitter::getSplit int  i = 0  )  [virtual]
 

Returns split number i.

Implements PLearn::Splitter.

Definition at line 295 of file RepeatSplitter.cc.

References indices, k, last_n, nsplits(), PLERROR, shuffle, and to_repeat.

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

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::Splitter.

Definition at line 278 of file RepeatSplitter.cc.

References PLearn::deepCopyField(), and to_repeat.

int PLearn::RepeatSplitter::nSetsPerSplit  )  const [virtual]
 

Returns the number of sets per split.

Implements PLearn::Splitter.

Definition at line 318 of file RepeatSplitter.cc.

References to_repeat.

int PLearn::RepeatSplitter::nsplits  )  const [virtual]
 

Returns the number of available different "splits".

Implements PLearn::Splitter.

Definition at line 326 of file RepeatSplitter.cc.

References n, and to_repeat.

Referenced by build_(), and getSplit().

PLearn::RepeatSplitter::PLEARN_DECLARE_OBJECT RepeatSplitter   ) 
 

Declares name and deepCopy methods.

void PLearn::RepeatSplitter::setDataSet VMat  the_dataset  )  [virtual]
 

Set the dataset on which the splits are to be based.

Reimplemented from PLearn::Splitter.

Definition at line 334 of file RepeatSplitter.cc.

References build(), and to_repeat.


Member Data Documentation

bool PLearn::RepeatSplitter::do_not_shuffle_first
 

Definition at line 72 of file RepeatSplitter.h.

Referenced by build_().

real PLearn::RepeatSplitter::force_proportion
 

Definition at line 73 of file RepeatSplitter.h.

Referenced by build_().

TMat<int> PLearn::RepeatSplitter::indices [protected]
 

A matrix where the i-th row is the vector of the indices of the i-th shuffled matrix (used only when shuffle = 1).

Definition at line 61 of file RepeatSplitter.h.

Referenced by build_(), and getSplit().

int PLearn::RepeatSplitter::last_n [protected]
 

Used to know if we need to reshuffle the matrix.

Definition at line 64 of file RepeatSplitter.h.

Referenced by build_(), and getSplit().

int PLearn::RepeatSplitter::n
 

Definition at line 74 of file RepeatSplitter.h.

Referenced by build_(), and nsplits().

long PLearn::RepeatSplitter::seed
 

Definition at line 75 of file RepeatSplitter.h.

Referenced by build_().

int PLearn::RepeatSplitter::shuffle
 

Definition at line 76 of file RepeatSplitter.h.

Referenced by build_(), and getSplit().

PP<Splitter> PLearn::RepeatSplitter::to_repeat
 

Definition at line 77 of file RepeatSplitter.h.

Referenced by getSplit(), makeDeepCopyFromShallowCopy(), nSetsPerSplit(), nsplits(), and setDataSet().


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