File label_sampling.hpp

class ILabelSampling
#include <label_sampling.hpp>

Defines an interface for all classes that implement a method for sampling labels.

Public Functions

inline virtual ~ILabelSampling()
virtual const IIndexVector &sample(RNG &rng) = 0

Creates and returns a sample of the available labels.

Parameters:

rng – A reference to an object of type RNG, implementing the random number generator to be used

Returns:

A reference to an object of type IIndexVector that provides access to the indices of the labels that are contained in the sample

class ILabelSamplingFactory
#include <label_sampling.hpp>

Defines an interface for all factories that allow to create objects of type ILabelSampling.

Public Functions

inline virtual ~ILabelSamplingFactory()
virtual std::unique_ptr<ILabelSampling> create() const = 0

Creates and returns a new object of type ILabelSampling.

Returns:

An unique pointer to an object of type ILabelSampling that has been created

class ILabelSamplingConfig
#include <label_sampling.hpp>

Defines an interface for all classes that allow to configure a method for sampling labels.

Subclassed by LabelSamplingWithoutReplacementConfig, NoLabelSamplingConfig, RoundRobinLabelSamplingConfig

Public Functions

inline virtual ~ILabelSamplingConfig()
virtual std::unique_ptr<ILabelSamplingFactory> createLabelSamplingFactory(const ILabelMatrix &labelMatrix) const = 0

Creates and returns a new object of type ILabelSamplingFactory according to the specified configuration.

Parameters:

labelMatrix – A reference to an object of type ILabelMatrix that provides access to the labels of the training examples

Returns:

An unique pointer to an object of type ILabelSamplingFactory that has been created