File feature_sampling.hpp¶
-
class IFeatureSampling¶
- #include <feature_sampling.hpp>
Defines an interface for all classes that implement a method for sampling features.
Subclassed by PredefinedFeatureSampling
Public Functions
-
inline virtual ~IFeatureSampling()¶
-
virtual const IIndexVector &sample() = 0¶
Creates and returns a sample of the available features.
- Returns:
A reference to an object of type
IIndexVectorthat provides access to the indices of the features that are contained in the sample
-
virtual std::unique_ptr<IFeatureSampling> createBeamSearchFeatureSampling(bool resample) = 0¶
Creates and returns a new object of type
IFeatureSamplingthat is suited for use during a beam search.- Parameters:
resample – True, if a new sample of the available features should be created whenever the sampling method is invoked during the beam search, false otherwise
- Returns:
An unique pointer to an object of type
IFeatureSamplingthat has been created
-
inline virtual ~IFeatureSampling()¶
-
class IFeatureSamplingFactory¶
- #include <feature_sampling.hpp>
Defines an interface for all factories that allow to create instances of the type
IFeatureSampling.Public Functions
-
inline virtual ~IFeatureSamplingFactory()¶
-
virtual std::unique_ptr<IFeatureSampling> create() const = 0¶
Creates and returns a new object of type
IFeatureSampling.- Returns:
An unique pointer to an object of type
IFeatureSamplingthat has been created
-
inline virtual ~IFeatureSamplingFactory()¶
-
class IFeatureSamplingConfig¶
- #include <feature_sampling.hpp>
Defines an interface for all classes that allow to configure a method for sampling features.
Subclassed by FeatureSamplingWithoutReplacementConfig, NoFeatureSamplingConfig
Public Functions
-
inline virtual ~IFeatureSamplingConfig()¶
-
virtual std::unique_ptr<IFeatureSamplingFactory> createFeatureSamplingFactory(const IFeatureMatrix &featureMatrix) const = 0¶
Creates and returns a new object of type
IFeatureSamplingFactoryaccording to the specified configuration.- Parameters:
featureMatrix – A reference to an object of type
IFeatureMatrixthat provides access to the features of the training examples- Returns:
An unique pointer to an object of type
IFeatureSamplingFactorythat has been created
-
virtual bool isSamplingUsed() const = 0¶
Returns whether feature sampling is used or not.
- Returns:
True, if feature sampling is used, false otherwise
-
inline virtual ~IFeatureSamplingConfig()¶