yat  0.20.3pre
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

◆ Sampler()

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

Constructor.

Parameters
targetused to balance partitions
NNumber of partitions

◆ ~Sampler()

virtual theplu::yat::classifier::Sampler::~Sampler ( )
pure virtual

Destructor (pure virtual destructor)

Member Function Documentation

◆ size()

size_t theplu::yat::classifier::Sampler::size ( void  ) const
Returns
number of partitions

◆ target()

const Target& theplu::yat::classifier::Sampler::target ( void  ) const
Returns
the targets for the total set

◆ training_index()

const utility::Index& theplu::yat::classifier::Sampler::training_index ( size_t  i) const
Returns
training indices

◆ training_target()

const Target& theplu::yat::classifier::Sampler::training_target ( size_t  i) const
Returns
training target
Note
if state is invalid the result is undefined

◆ validation_index()

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

◆ validation_target()

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 Sat Feb 18 2023 03:31:44 for yat by  doxygen 1.8.14