File instance_sampling_stratified_example_wise.hpp

class IExampleWiseStratifiedInstanceSamplingConfig
#include <instance_sampling_stratified_example_wise.hpp>

Defines an interface for all classes that allow to configure a method for selecting a subset of the available training examples using stratification, where distinct label vectors are treated as individual classes.

Subclassed by ExampleWiseStratifiedInstanceSamplingConfig

Public Functions

inline virtual ~IExampleWiseStratifiedInstanceSamplingConfig()
virtual float32 getSampleSize() const = 0

Returns the fraction of examples that are included in a sample.

Returns:

The fraction of examples that are included in a sample

virtual IExampleWiseStratifiedInstanceSamplingConfig &setSampleSize(float32 sampleSize) = 0

Sets the fraction of examples that should be included in a sample.

Parameters:

sampleSize – The fraction of examples that should be included in a sample, e.g., a value of 0.6 corresponds to 60 % of the available training examples. Must be in (0, 1)

Returns:

A reference to an object of type IExampleWiseStratifiedInstanceSamplingConfig that allows further configuration of the method for sampling instances

class ExampleWiseStratifiedInstanceSamplingConfig : public IInstanceSamplingConfig, public IExampleWiseStratifiedInstanceSamplingConfig
#include <instance_sampling_stratified_example_wise.hpp>

Allows to configure a method for selecting a subset of the available training examples using stratification, where distinct label vectors are treated as individual classes.

Public Functions

ExampleWiseStratifiedInstanceSamplingConfig()
virtual float32 getSampleSize() const override

Returns the fraction of examples that are included in a sample.

Returns:

The fraction of examples that are included in a sample

virtual IExampleWiseStratifiedInstanceSamplingConfig &setSampleSize(float32 sampleSize) override

Sets the fraction of examples that should be included in a sample.

Parameters:

sampleSize – The fraction of examples that should be included in a sample, e.g., a value of 0.6 corresponds to 60 % of the available training examples. Must be in (0, 1)

Returns:

A reference to an object of type IExampleWiseStratifiedInstanceSamplingConfig that allows further configuration of the method for sampling instances

virtual std::unique_ptr<IInstanceSamplingFactory> createInstanceSamplingFactory() const override

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

Returns:

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

Private Members

float32 sampleSize_