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(RNG &rng) = 0¶
Creates and returns a partition of the available training examples.
- Parameters:
rng – A reference to an object of type
RNG
, implementing the random number generator to be used- 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
-
inline virtual ~IPartitionSampling()¶
-
class IPartitionSamplingFactory¶
- #include <partition_sampling.hpp>
Defines an interface for all factories that allow to create objects of type
IPartitionSampling
.Public Functions
-
inline virtual ~IPartitionSamplingFactory()¶
-
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
-
inline virtual ~IPartitionSamplingFactory()¶
-
class IPartitionSamplingConfig¶
- #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.
Subclassed by ExampleWiseStratifiedBiPartitionSamplingConfig, LabelWiseStratifiedBiPartitionSamplingConfig, NoPartitionSamplingConfig, RandomBiPartitionSamplingConfig
Public Functions
-
inline virtual ~IPartitionSamplingConfig()¶
-
virtual std::unique_ptr<IPartitionSamplingFactory> createPartitionSamplingFactory() const = 0¶
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
-
inline virtual ~IPartitionSamplingConfig()¶