#include <RepeatSplitter.h>
Inheritance diagram for PLearn::RepeatSplitter:
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< VMat > | getSplit (int i=0) |
Returns split number i. | |
Public Attributes | |
bool | do_not_shuffle_first |
real | force_proportion |
int | n |
long | seed |
int | shuffle |
PP< Splitter > | to_repeat |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Protected Attributes | |
TMat< int > | indices |
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. |
|
Reimplemented from PLearn::Splitter. Definition at line 51 of file RepeatSplitter.h. |
|
Definition at line 51 of file RepeatSplitter.cc. References PLearn::seed(), and PLearn::shuffle(). |
|
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(). |
|
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(). |
|
Declares this class' options.
Reimplemented from PLearn::Object. Definition at line 70 of file RepeatSplitter.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
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. |
|
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. |
|
Returns the number of sets per split.
Implements PLearn::Splitter. Definition at line 318 of file RepeatSplitter.cc. References to_repeat. |
|
Returns the number of available different "splits".
Implements PLearn::Splitter. Definition at line 326 of file RepeatSplitter.cc. Referenced by build_(), and getSplit(). |
|
Declares name and deepCopy methods.
|
|
Set the dataset on which the splits are to be based.
Reimplemented from PLearn::Splitter. Definition at line 334 of file RepeatSplitter.cc. |
|
Definition at line 72 of file RepeatSplitter.h. Referenced by build_(). |
|
Definition at line 73 of file RepeatSplitter.h. Referenced by build_(). |
|
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(). |
|
Used to know if we need to reshuffle the matrix.
Definition at line 64 of file RepeatSplitter.h. Referenced by build_(), and getSplit(). |
|
Definition at line 74 of file RepeatSplitter.h. |
|
Definition at line 75 of file RepeatSplitter.h. Referenced by build_(). |
|
Definition at line 76 of file RepeatSplitter.h. Referenced by build_(), and getSplit(). |
|
Definition at line 77 of file RepeatSplitter.h. Referenced by getSplit(), makeDeepCopyFromShallowCopy(), nSetsPerSplit(), nsplits(), and setDataSet(). |