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
IRandomBiPartitionSamplingConfigthat 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 IClassificationPartitionSamplingConfig, public IRegressionPartitionSamplingConfig, 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(ReadableProperty<RNGConfig> rngConfig)¶
- Parameters:
rngConfig – A
ReadablePropertythat provides access to theRNGConfigthat stores the configuration of random number generators
-
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
IRandomBiPartitionSamplingConfigthat allows further configuration of the method for partitioning the available training examples into a training set and a holdout set
-
virtual std::unique_ptr<IClassificationPartitionSamplingFactory> createClassificationPartitionSamplingFactory() const override¶
Creates and returns a new object of type
IClassificationPartitionSamplingFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IClassificationPartitionSamplingFactorythat has been created
-
virtual std::unique_ptr<IRegressionPartitionSamplingFactory> createRegressionPartitionSamplingFactory() const override¶
Creates and returns a new object of type
IRegressionPartitionSamplingFactoryaccording to the specified configuration.- Returns:
An unique pointer to an object of type
IRegressionPartitionSamplingFactorythat has been created
-
RandomBiPartitionSamplingConfig(ReadableProperty<RNGConfig> rngConfig)¶