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
IIndexVectorthat provides access to the indices of the labels that are contained in the sample
-
inline virtual ~ILabelSampling()¶
-
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
ILabelSamplingthat has been created
-
inline virtual ~ILabelSamplingFactory()¶
-
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
ILabelSamplingFactoryaccording to the specified configuration.- Parameters:
labelMatrix – A reference to an object of type
ILabelMatrixthat provides access to the labels of the training examples- Returns:
An unique pointer to an object of type
ILabelSamplingFactorythat has been created
-
inline virtual ~ILabelSamplingConfig()¶