yat
0.14.5pre
|
Class splitting a set into training set and validation set in a crossvalidation manner. More...
#include <yat/classifier/CrossValidationSampler.h>
Public Member Functions | |
CrossValidationSampler (const Target &target, const size_t N, const size_t k) | |
Constructor. More... | |
virtual | ~CrossValidationSampler () |
size_t | size (void) const |
const Target & | target (void) const |
const utility::Index & | training_index (size_t i) const |
const Target & | training_target (size_t i) const |
const utility::Index & | validation_index (size_t i) const |
const Target & | validation_target (size_t i) const |
Protected Attributes | |
std::vector< utility::Index > | training_index_ |
index of training sets for the partitions | |
std::vector< Target > | training_target_ |
Targets for training sets for the partitions. | |
std::vector< utility::Index > | validation_index_ |
index of validation sets for the partitions | |
std::vector< Target > | validation_target_ |
Targets for validation sets for the partitions. | |
Class splitting a set into training set and validation set in a crossvalidation manner.
This is done in a balanced way, meaning the proportions between the classes in the trainingset is close to the proportions in the whole dataset. In the first k rounds each sample is returned k-1 times, for next round the samples are shuffled and... In total there are N partitions, in other words, each sample is in validation roughly N/k
theplu::yat::classifier::CrossValidationSampler::CrossValidationSampler | ( | const Target & | target, |
const size_t | N, | ||
const size_t | k | ||
) |
Constructor.
target targets. N total number of partitions. k for k-fold crossvalidation.
|
virtual |
Destructor
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |