File partition_sampling_bi_random.hpp¶
-
class IRandomBiPartitionSamplingConfig¶
- #include <partition_sampling_bi_random.hpp>
Defines an interface for all classes that allow to configure a method for partitioning the available training examples into a training set and a holdout set that randomly splits the training examples into two mutually exclusive sets.
Subclassed by RandomBiPartitionSamplingConfig
Public Functions
-
inline virtual ~IRandomBiPartitionSamplingConfig()¶
-
virtual float32 getHoldoutSetSize() const = 0¶
Returns the fraction of examples that are included in the holdout set.
- Returns:
The fraction of examples that are included in the holdout set
-
virtual IRandomBiPartitionSamplingConfig &setHoldoutSetSize(float32 holdoutSetSize) = 0¶
Sets the fraction of examples that should be included in the holdout set.
- Parameters:
holdoutSetSize – The fraction of examples that should be included in the holdout set, e.g. a value of 0.6 corresponds to 60 % of the available examples. Must be in (0, 1)
- Returns:
A reference to an object of type
IRandomBiPartitionSamplingConfig
that allows further configuration of the method for partitioning the available training examples into a training set and a holdout set
-
inline virtual ~IRandomBiPartitionSamplingConfig()¶
-
class RandomBiPartitionSamplingConfig : public IPartitionSamplingConfig, public IRandomBiPartitionSamplingConfig¶
- #include <partition_sampling_bi_random.hpp>
Allows to configure a method for partitioning the available training examples into a training set and a holdout set that randomly splits the training examples into two mutually exclusive sets.
Public Functions
-
RandomBiPartitionSamplingConfig()¶
-
virtual float32 getHoldoutSetSize() const override¶
Returns the fraction of examples that are included in the holdout set.
- Returns:
The fraction of examples that are included in the holdout set
-
virtual IRandomBiPartitionSamplingConfig &setHoldoutSetSize(float32 holdoutSetSize) override¶
Sets the fraction of examples that should be included in the holdout set.
- Parameters:
holdoutSetSize – The fraction of examples that should be included in the holdout set, e.g. a value of 0.6 corresponds to 60 % of the available examples. Must be in (0, 1)
- Returns:
A reference to an object of type
IRandomBiPartitionSamplingConfig
that allows further configuration of the method for partitioning the available training examples into a training set and a holdout set
-
virtual std::unique_ptr<IPartitionSamplingFactory> createPartitionSamplingFactory() const override¶
Creates and returns a new object of type
IPartitionSamplingFactory
according to the specified configuration.- Returns:
An unique pointer to an object of type
IPartitionSamplingFactory
that has been created
-
RandomBiPartitionSamplingConfig()¶