Abstract base class for all splitting types. Takes a CLabels instance and generates a desired number of subsets which are being accessed by their indices via the method generate_subset_indices(...).
When being extended, the abstract method build_subsets() has to be implemented AND to be called in the constructor of sub-classes. Implementations have to fill the DynArray<index_t> elements in the (inherited) m_subset_indices variable. Note that these elements are already created by the constructor of this class - they just have to be filled. Every element represents one index subset.
Definition at line 34 of file SplittingStrategy.h.
List of all members.
Constructor & Destructor Documentation
|labels ||labels to be (possibly) used for splitting |
|num_subsets ||desired number of subsets, the labels are split into |
Member Function Documentation
|virtual void build_subsets
[protected, pure virtual]
Abstract method. Has to fill the elements of the m_subset_indices variable with concrete indices. Note that CDynamicArray<index_t> instances for every subset are created in the constructor of this class - they just have to be filled.
Implemented in CStratifiedCrossValidationSplitting.
generates a newly created SGVector<index_t> with indices of the subset with the desired index
|subset_idx ||subset index of the to be generated vector indices |
- newly created vector of subset indices of the specified subset is written here. do not forget to free_vector
Definition at line 87 of file SplittingStrategy.cpp.
generates a newly created SGVector<index_t> with inverse indices of the subset with the desired index. inverse here means all other indices.
|subset_idx ||subset index of the to be generated inverse indices |
- newly created vector of the subset's inverse indices is written here. do not forget to free_vector
Definition at line 104 of file SplittingStrategy.cpp.
|virtual const char* get_name
Member Data Documentation
The documentation for this class was generated from the following files: