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

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 ReadableProperty that provides access to the RNGConfig that 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 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<IClassificationPartitionSamplingFactory> createClassificationPartitionSamplingFactory() const override

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

Returns:

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

virtual std::unique_ptr<IRegressionPartitionSamplingFactory> createRegressionPartitionSamplingFactory() const override

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

Returns:

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

Private Members

const ReadableProperty<RNGConfig> rngConfig_
float32 holdoutSetSize_