#include <yat/classifier/BootstrapSampler.h>
Public Member Functions | |
BootstrapSampler (const Target &target, const size_t N) | |
Constructor. | |
virtual | ~BootstrapSampler () |
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. |
This is done in a balanced way, meaning the proportions between the classes in the trainingset is equal to the proportions in the whole dataset. For each class samples are drawn with replacement, where is number of samples in class i.
theplu::yat::classifier::BootstrapSampler::BootstrapSampler | ( | const Target & | target, | |
const size_t | N | |||
) |
Constructor.
target targets. N total number of partitions.
virtual theplu::yat::classifier::BootstrapSampler::~BootstrapSampler | ( | ) | [virtual] |
Destructor
size_t theplu::yat::classifier::Sampler::size | ( | void | ) | const [inherited] |
const Target& theplu::yat::classifier::Sampler::target | ( | void | ) | const [inherited] |
const utility::Index& theplu::yat::classifier::Sampler::training_index | ( | size_t | i | ) | const [inherited] |
const Target& theplu::yat::classifier::Sampler::training_target | ( | size_t | i | ) | const [inherited] |
const utility::Index& theplu::yat::classifier::Sampler::validation_index | ( | size_t | i | ) | const [inherited] |
const Target& theplu::yat::classifier::Sampler::validation_target | ( | size_t | i | ) | const [inherited] |