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

PLearn::Splitter Class Reference

#include <Splitter.h>

Inheritance diagram for PLearn::Splitter:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PLEARN_DECLARE_ABSTRACT_OBJECT (Splitter)
 Splitter ()
virtual void setDataSet (VMat the_dataset)
 Sets the dataset on which the splits are to be based.

VMat getDataSet ()
 Returns the dataset given with setDataSet.

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

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

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

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


Protected Attributes

VMat dataset

Private Types

typedef Object inherited

Detailed Description

This class is an abstract base class for mechanisms allowing to "split" a dataset into one or several partitions (or "splits").

Thus for instance a subclass can be used to implement k-fold splits (for k-fold cross validation), where each of the k splits returned by getSplit(i=0..k-1) would be an 2-element array containing the corresponding training-set and test-set.

A splitter is an essential part of a PTester.

Definition at line 63 of file Splitter.h.


Member Typedef Documentation

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

Reimplemented from PLearn::Object.

Reimplemented in PLearn::BootstrapSplitter, PLearn::DBSplitter, PLearn::ExplicitSplitter, PLearn::FilterSplitter, PLearn::FractionSplitter, PLearn::KFoldSplitter, PLearn::RepeatSplitter, PLearn::SequentialSplitter, PLearn::SourceVMatrixSplitter, PLearn::TestInTrainSplitter, PLearn::ToBagSplitter, PLearn::TrainTestBagsSplitter, PLearn::TrainTestSplitter, and PLearn::TrainValidTestSplitter.

Definition at line 65 of file Splitter.h.


Constructor & Destructor Documentation

PLearn::Splitter::Splitter  )  [inline]
 

Definition at line 81 of file Splitter.h.


Member Function Documentation

VMat PLearn::Splitter::getDataSet  )  [inline]
 

Returns the dataset given with setDataSet.

Definition at line 87 of file Splitter.h.

References dataset.

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

Returns split number i.

Implemented in PLearn::BootstrapSplitter, PLearn::DBSplitter, PLearn::ExplicitSplitter, PLearn::FilterSplitter, PLearn::FractionSplitter, PLearn::KFoldSplitter, PLearn::RepeatSplitter, PLearn::SequentialSplitter, PLearn::SourceVMatrixSplitter, PLearn::TestInTrainSplitter, PLearn::ToBagSplitter, PLearn::TrainTestBagsSplitter, PLearn::TrainTestSplitter, and PLearn::TrainValidTestSplitter.

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

Transforms a shallow copy into a deep copy.

Reimplemented in PLearn::BootstrapSplitter, PLearn::DBSplitter, PLearn::ExplicitSplitter, PLearn::FilterSplitter, PLearn::FractionSplitter, PLearn::RepeatSplitter, PLearn::SourceVMatrixSplitter, PLearn::TestInTrainSplitter, PLearn::ToBagSplitter, and PLearn::TrainValidTestSplitter.

Definition at line 51 of file Splitter.cc.

References dataset, and PLearn::deepCopyField().

virtual int PLearn::Splitter::nSetsPerSplit  )  const [pure virtual]
 

Returns the number of sets per split.

Implemented in PLearn::BootstrapSplitter, PLearn::DBSplitter, PLearn::ExplicitSplitter, PLearn::FilterSplitter, PLearn::FractionSplitter, PLearn::KFoldSplitter, PLearn::RepeatSplitter, PLearn::SequentialSplitter, PLearn::SourceVMatrixSplitter, PLearn::TestInTrainSplitter, PLearn::ToBagSplitter, PLearn::TrainTestBagsSplitter, PLearn::TrainTestSplitter, and PLearn::TrainValidTestSplitter.

virtual int PLearn::Splitter::nsplits  )  const [pure virtual]
 

Returns the number of available different "splits".

Implemented in PLearn::BootstrapSplitter, PLearn::DBSplitter, PLearn::ExplicitSplitter, PLearn::FilterSplitter, PLearn::FractionSplitter, PLearn::KFoldSplitter, PLearn::RepeatSplitter, PLearn::SequentialSplitter, PLearn::SourceVMatrixSplitter, PLearn::TestInTrainSplitter, PLearn::ToBagSplitter, PLearn::TrainTestBagsSplitter, PLearn::TrainTestSplitter, and PLearn::TrainValidTestSplitter.

PLearn::Splitter::PLEARN_DECLARE_ABSTRACT_OBJECT Splitter   ) 
 

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

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

Reimplemented in PLearn::BootstrapSplitter, PLearn::RepeatSplitter, PLearn::SourceVMatrixSplitter, PLearn::TestInTrainSplitter, PLearn::ToBagSplitter, and PLearn::TrainValidTestSplitter.

Definition at line 56 of file Splitter.cc.

References dataset.


Member Data Documentation

VMat PLearn::Splitter::dataset [protected]
 

Definition at line 72 of file Splitter.h.

Referenced by getDataSet(), makeDeepCopyFromShallowCopy(), and setDataSet().


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