File label_sampling_without_replacement.hpp¶
-
class ILabelSamplingWithoutReplacementConfig¶
- #include <label_sampling_without_replacement.hpp>
Defines an interface for all classes that allow to configure a method for sampling labels without replacement.
Subclassed by LabelSamplingWithoutReplacementConfig
Public Functions
-
inline virtual ~ILabelSamplingWithoutReplacementConfig()¶
-
virtual uint32 getNumSamples() const = 0¶
Returns the number of labels that are included in a sample.
- Returns:
The number of labels that are included in a sample
-
virtual ILabelSamplingWithoutReplacementConfig &setNumSamples(uint32 numSamples) = 0¶
Sets the number of labels that should be included in a sample.
- Parameters:
numSamples – The number of labels that should be included in a sample. Must be at least 1
- Returns:
A reference to an object of type
ILabelSamplingWithoutReplacementConfig
that allows further configuration of the method for sampling labels
-
inline virtual ~ILabelSamplingWithoutReplacementConfig()¶
-
class LabelSamplingWithoutReplacementConfig : public ILabelSamplingConfig, public ILabelSamplingWithoutReplacementConfig¶
- #include <label_sampling_without_replacement.hpp>
Allows to configure a method for sampling labels without replacement.
Public Functions
-
LabelSamplingWithoutReplacementConfig()¶
-
virtual uint32 getNumSamples() const override¶
Returns the number of labels that are included in a sample.
- Returns:
The number of labels that are included in a sample
-
virtual ILabelSamplingWithoutReplacementConfig &setNumSamples(uint32 numSamples) override¶
Sets the number of labels that should be included in a sample.
- Parameters:
numSamples – The number of labels that should be included in a sample. Must be at least 1
- Returns:
A reference to an object of type
ILabelSamplingWithoutReplacementConfig
that allows further configuration of the method for sampling labels
-
virtual std::unique_ptr<ILabelSamplingFactory> createLabelSamplingFactory(const ILabelMatrix &labelMatrix) const override¶
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
-
LabelSamplingWithoutReplacementConfig()¶