File partition_sampling_bi_stratified_label_wise.hpp

class ILabelWiseStratifiedBiPartitionSamplingConfig
#include <partition_sampling_bi_stratified_label_wise.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 using stratification, such that for each label the proportion of relevant and irrelevant examples is maintained.

Subclassed by LabelWiseStratifiedBiPartitionSamplingConfig

Public Functions

inline virtual ~ILabelWiseStratifiedBiPartitionSamplingConfig()
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 ILabelWiseStratifiedBiPartitionSamplingConfig &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 ILabelWiseStratifiedBiPartitionSamplingConfig that allows further configuration of the method for partitioning the available training examples into a training set and a holdout set

class LabelWiseStratifiedBiPartitionSamplingConfig : public IPartitionSamplingConfig, public ILabelWiseStratifiedBiPartitionSamplingConfig
#include <partition_sampling_bi_stratified_label_wise.hpp>

Allows to configure a method for partitioning the available training examples into a training set and a holdout set using stratification, such that for each label the proportion of relevant and irrelevant examples is maintained.

Public Functions

LabelWiseStratifiedBiPartitionSamplingConfig()
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 ILabelWiseStratifiedBiPartitionSamplingConfig &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 ILabelWiseStratifiedBiPartitionSamplingConfig 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

Private Members

float32 holdoutSetSize_