File partition_sampling.hpp

class IPartitionSampling
#include <partition_sampling.hpp>

Defines an interface for all classes that implement a method for partitioning the available training examples into a training set and a holdout set.

Public Functions

inline virtual ~IPartitionSampling()
virtual IPartition &partition() = 0

Creates and returns a partition of the available training examples.

Returns:

A reference to an object of type IPartition that provides access to the indices of the training examples that belong to the training set and holdout set, respectively

class IClassificationPartitionSamplingFactory
#include <partition_sampling.hpp>

Defines an interface for all factories that allow to create objects of type IPartitionSampling that can be used in classification problems.

Public Functions

inline virtual ~IClassificationPartitionSamplingFactory()
virtual std::unique_ptr<IPartitionSampling> create(const CContiguousView<const uint8> &labelMatrix) const = 0

Creates and returns a new object of type IPartitionSampling.

Parameters:

labelMatrix – A reference to an object of type CContiguousView that provides random access to the labels of the training examples

Returns:

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

virtual std::unique_ptr<IPartitionSampling> create(const BinaryCsrView &labelMatrix) const = 0

Creates and returns a new object of type IPartitionSampling.

Parameters:

labelMatrix – A reference to an object of type BinaryCsrView that provides row-wise access to the labels of the training examples

Returns:

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

class IRegressionPartitionSamplingFactory
#include <partition_sampling.hpp>

Defines an interface for all factories that allow to create objects of type IPartitionSampling that can be used in regression problems.

Public Functions

inline virtual ~IRegressionPartitionSamplingFactory()
virtual std::unique_ptr<IPartitionSampling> create(const CContiguousView<const float32> &regressionMatrix) const = 0

Creates and returns a new object of type IPartitionSampling.

Parameters:

regressionMatrix – A reference to an object of type CContiguousView that provides random access to the regression scores of the training examples

Returns:

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

virtual std::unique_ptr<IPartitionSampling> create(const CsrView<const float32> &regressionMatrix) const = 0

Creates and returns a new object of type IPartitionSampling.

Parameters:

regressionMatrix – A reference to an object of type CsrView that provides row-wise access to the regression scores of the training examples

Returns:

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

class IClassificationPartitionSamplingConfig
#include <partition_sampling.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 can be used in classification problems.

Subclassed by ExampleWiseStratifiedBiPartitionSamplingConfig, NoPartitionSamplingConfig, OutputWiseStratifiedBiPartitionSamplingConfig, RandomBiPartitionSamplingConfig

Public Functions

inline virtual ~IClassificationPartitionSamplingConfig()
virtual std::unique_ptr<IClassificationPartitionSamplingFactory> createClassificationPartitionSamplingFactory() const = 0

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

class IRegressionPartitionSamplingConfig
#include <partition_sampling.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 can be used in regression problems.

Subclassed by NoPartitionSamplingConfig, RandomBiPartitionSamplingConfig

Public Functions

inline virtual ~IRegressionPartitionSamplingConfig()
virtual std::unique_ptr<IRegressionPartitionSamplingFactory> createRegressionPartitionSamplingFactory() const = 0

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