#include <Splitter.h>
Inheritance diagram for PLearn::Splitter:
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< VMat > | getSplit (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 |
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.
|
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. |
|
Definition at line 81 of file Splitter.h. |
|
Returns the dataset given with setDataSet.
Definition at line 87 of file Splitter.h. References dataset. |
|
|
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(). |
|
|
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. |
|
|
|
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. |
|
Definition at line 72 of file Splitter.h. Referenced by getDataSet(), makeDeepCopyFromShallowCopy(), and setDataSet(). |