yat  0.13.2pre
Public Member Functions | Protected Attributes | List of all members
theplu::yat::classifier::BootstrapSampler Class Reference

Class creating trainingset and validationset using bootstrapping. More...

#include <yat/classifier/BootstrapSampler.h>

Inheritance diagram for theplu::yat::classifier::BootstrapSampler:
theplu::yat::classifier::Sampler

Public Member Functions

 BootstrapSampler (const Target &target, const size_t N)
 Constructor. More...
 
virtual ~BootstrapSampler ()
 
size_t size (void) const
 
const Targettarget (void) const
 
const utility::Indextraining_index (size_t i) const
 
const Targettraining_target (size_t i) const
 
const utility::Indexvalidation_index (size_t i) const
 
const Targetvalidation_target (size_t i) const
 

Protected Attributes

std::vector< utility::Indextraining_index_
 index of training sets for the partitions
 
std::vector< Targettraining_target_
 Targets for training sets for the partitions.
 
std::vector< utility::Indexvalidation_index_
 index of validation sets for the partitions
 
std::vector< Targetvalidation_target_
 Targets for validation sets for the partitions.
 

Detailed Description

Class creating trainingset and validationset using bootstrapping.

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 $ N_i $ samples are drawn with replacement, where $ N_i $ is number of samples in class i.

Constructor & Destructor Documentation

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

Member Function Documentation

size_t theplu::yat::classifier::Sampler::size ( void  ) const
inherited
Returns
number of partitions
const Target& theplu::yat::classifier::Sampler::target ( void  ) const
inherited
Returns
the targets for the total set
const utility::Index& theplu::yat::classifier::Sampler::training_index ( size_t  i) const
inherited
Returns
training indices
const Target& theplu::yat::classifier::Sampler::training_target ( size_t  i) const
inherited
Returns
training target
Note
if state is invalid the result is undefined
const utility::Index& theplu::yat::classifier::Sampler::validation_index ( size_t  i) const
inherited
Returns
validation index
Note
if state is invalid the result is undefined
const Target& theplu::yat::classifier::Sampler::validation_target ( size_t  i) const
inherited
Returns
validation target
Note
if state is invalid the result is undefined

The documentation for this class was generated from the following file:

Generated on Wed Jan 4 2017 02:23:07 for yat by  doxygen 1.8.5