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

PLearn::TrainTestSplitter Class Reference

#include <TrainTestSplitter.h>

Inheritance diagram for PLearn::TrainTestSplitter:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TrainTestSplitter (real the_test_fraction=0.0)
virtual void build ()
 Should call simply inherited::build(), then this class's build_().

 PLEARN_DECLARE_OBJECT (TrainTestSplitter)
 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

int append_train
real test_fraction

Static Protected Member Functions

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


Private Types

typedef Splitter inherited

Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

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

Reimplemented from PLearn::Splitter.

Definition at line 52 of file TrainTestSplitter.h.


Constructor & Destructor Documentation

PLearn::TrainTestSplitter::TrainTestSplitter real  the_test_fraction = 0.0  ) 
 

Definition at line 50 of file TrainTestSplitter.cc.


Member Function Documentation

void PLearn::TrainTestSplitter::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 74 of file TrainTestSplitter.cc.

References build_().

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

This does the actual building.

Reimplemented from PLearn::Object.

Definition at line 69 of file TrainTestSplitter.cc.

Referenced by build().

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

Declares this class' options.

Reimplemented from PLearn::Object.

Definition at line 57 of file TrainTestSplitter.cc.

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

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

Returns split number i.

Implements PLearn::Splitter.

Definition at line 93 of file TrainTestSplitter.cc.

References append_train, k, PLearn::VMat::length(), PLERROR, PLearn::TVec< T >::resize(), PLearn::VMat::subMatRows(), and test_fraction.

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

Returns the number of sets per split.

Implements PLearn::Splitter.

Definition at line 85 of file TrainTestSplitter.cc.

References append_train.

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

Returns the number of available different "splits".

Implements PLearn::Splitter.

Definition at line 80 of file TrainTestSplitter.cc.

PLearn::TrainTestSplitter::PLEARN_DECLARE_OBJECT TrainTestSplitter   ) 
 

Declares name and deepCopy methods.


Member Data Documentation

int PLearn::TrainTestSplitter::append_train
 

Definition at line 68 of file TrainTestSplitter.h.

Referenced by getSplit(), and nSetsPerSplit().

real PLearn::TrainTestSplitter::test_fraction
 

Definition at line 69 of file TrainTestSplitter.h.

Referenced by getSplit().


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