File feature_sampling_predefined.hpp¶
-
class PredefinedFeatureSampling : public IFeatureSampling¶
- #include <feature_sampling_predefined.hpp>
An implementation of the class
IFeatureSamplingthat does not perform any sampling, but always returns a predefined set of features.Public Functions
-
PredefinedFeatureSampling(const IIndexVector &indexVector)¶
- Parameters:
indexVector – A reference to an object of type
IIndexVectorthat stores predefined feature indices
-
virtual const IIndexVector &sample() override¶
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) override¶
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
Private Members
-
const IIndexVector &indexVector_¶
-
PredefinedFeatureSampling(const IIndexVector &indexVector)¶