#include <TestInTrainSplitter.h>
Inheritance diagram for PLearn::TestInTrainSplitter:
Public Member Functions | |
TestInTrainSplitter () | |
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 (TestInTrainSplitter) | |
Declares name and deepCopy methods. | |
virtual void | setDataSet (VMat the_dataset) |
Overridden to forward to underlying splitter and reset 'first_source_split'. | |
virtual int | nsplits () const |
Returns the number of available different "splits". | |
virtual int | nSetsPerSplit () const |
Returns the number of sets per split. | |
virtual void | getFirstSplit () const |
Compute the first split of source_splitter and store it in 'first_source_split'. | |
virtual TVec< VMat > | getSplit (int i=0) |
Returns split number i. | |
Public Attributes | |
real | percentage_added |
PP< Splitter > | source_splitter |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Protected Attributes | |
TVec< VMat > | first_source_split |
Store the first split provided by the source_splitter. | |
int | n_left |
The number of samples in the test set that would be left if we didn't make sure they were all added once. | |
int | n_splits_per_source_split |
The number of splits to make for each split given by the source_splitter. | |
int | n_train |
The number of samples in the train and test parts, as given by the source_splitter. | |
int | n_test |
The number of samples in the train and test parts, as given by the source_splitter. | |
int | n_to_add |
The number of sample to add each time in the train set. | |
Private Types | |
typedef Splitter | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
|
Reimplemented from PLearn::Splitter. Definition at line 57 of file TestInTrainSplitter.h. |
|
Definition at line 51 of file TestInTrainSplitter.cc. |
|
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 105 of file TestInTrainSplitter.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::Object. Definition at line 94 of file TestInTrainSplitter.cc. Referenced by build(). |
|
Declares this class' options.
Reimplemented from PLearn::Object. Definition at line 75 of file TestInTrainSplitter.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
Compute the first split of source_splitter and store it in 'first_source_split'.
Definition at line 162 of file TestInTrainSplitter.cc. References first_source_split, PLearn::TVec< VMat >::length(), n_test, n_train, and source_splitter. Referenced by getSplit(), and nsplits(). |
|
Returns split number i.
Implements PLearn::Splitter. Definition at line 171 of file TestInTrainSplitter.cc. References first_source_split, getFirstSplit(), PLearn::TVec< VMat >::isEmpty(), k, PLearn::TVec< T >::length(), PLearn::VMat::length(), n_left, n_splits_per_source_split, n_test, n_to_add, n_train, PLERROR, source_splitter, PLearn::vconcat(), and PLearn::VMat::width(). |
|
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::Splitter. Definition at line 111 of file TestInTrainSplitter.cc. References PLERROR. |
|
Returns the number of sets per split.
Implements PLearn::Splitter. Definition at line 154 of file TestInTrainSplitter.cc. References source_splitter. |
|
Returns the number of available different "splits".
Implements PLearn::Splitter. Definition at line 128 of file TestInTrainSplitter.cc. References first_source_split, getFirstSplit(), PLearn::TVec< VMat >::isEmpty(), n_left, n_splits_per_source_split, n_test, n_to_add, n_train, percentage_added, PLERROR, and source_splitter. |
|
Declares name and deepCopy methods.
|
|
Overridden to forward to underlying splitter and reset 'first_source_split'.
Reimplemented from PLearn::Splitter. Definition at line 217 of file TestInTrainSplitter.cc. References first_source_split, PLearn::TVec< VMat >::resize(), and source_splitter. |
|
Store the first split provided by the source_splitter. This is because we need it the number of points in the train and test parts in the nsplits() method. Definition at line 72 of file TestInTrainSplitter.h. Referenced by getFirstSplit(), getSplit(), nsplits(), and setDataSet(). |
|
The number of samples in the test set that would be left if we didn't make sure they were all added once.
Definition at line 76 of file TestInTrainSplitter.h. Referenced by getSplit(), and nsplits(). |
|
The number of splits to make for each split given by the source_splitter.
Definition at line 79 of file TestInTrainSplitter.h. Referenced by getSplit(), and nsplits(). |
|
The number of samples in the train and test parts, as given by the source_splitter.
Definition at line 83 of file TestInTrainSplitter.h. Referenced by getFirstSplit(), getSplit(), and nsplits(). |
|
The number of sample to add each time in the train set.
Definition at line 86 of file TestInTrainSplitter.h. Referenced by getSplit(), and nsplits(). |
|
The number of samples in the train and test parts, as given by the source_splitter.
Definition at line 83 of file TestInTrainSplitter.h. Referenced by getFirstSplit(), getSplit(), and nsplits(). |
|
Definition at line 94 of file TestInTrainSplitter.h. Referenced by nsplits(). |
|
Definition at line 95 of file TestInTrainSplitter.h. Referenced by getFirstSplit(), getSplit(), nSetsPerSplit(), nsplits(), and setDataSet(). |