yat  0.16pre
Public Member Functions | Protected Attributes | List of all members
theplu::yat::classifier::Sampler Class Referenceabstract

Interface class for dividing samples into training and validation. More...

#include <yat/classifier/Sampler.h>

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

Public Member Functions

 Sampler (const Target &target, size_t N)
 Constructor. More...
 
virtual ~Sampler ()=0
 
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

Interface class for dividing samples into training and validation.

Constructor & Destructor Documentation

theplu::yat::classifier::Sampler::Sampler ( const Target target,
size_t  N 
)

Constructor.

Parameters
targetused to balance partitions
NNumber of partitions
virtual theplu::yat::classifier::Sampler::~Sampler ( )
pure virtual

Destructor (pure virtual destructor)

Member Function Documentation

size_t theplu::yat::classifier::Sampler::size ( void  ) const
Returns
number of partitions
const Target& theplu::yat::classifier::Sampler::target ( void  ) const
Returns
the targets for the total set
const utility::Index& theplu::yat::classifier::Sampler::training_index ( size_t  i) const
Returns
training indices
const Target& theplu::yat::classifier::Sampler::training_target ( size_t  i) const
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
Returns
validation index
Note
if state is invalid the result is undefined
const Target& theplu::yat::classifier::Sampler::validation_target ( size_t  i) const
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 Aug 15 2018 02:22:39 for yat by  doxygen 1.8.11