File feature_sampling_predefined.hpp¶
-
class PredefinedFeatureSampling : public IFeatureSampling¶
- #include <feature_sampling_predefined.hpp>
An implementation of the class
IFeatureSampling
that 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
IIndexVector
that stores predefined feature indices
-
virtual const IIndexVector &sample(RNG &rng) override¶
Creates and returns a sample of the available features.
- 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
IIndexVector
that provides access to the indices of the features that are contained in the sample
-
virtual std::unique_ptr<IFeatureSampling> createBeamSearchFeatureSampling(RNG &rng, bool resample) override¶
Creates and returns a new object of type
IFeatureSampling
that is suited for use during a beam search.- Parameters:
rng – A reference to an object of type
RNG
, implementing the random number generator be usedresample – 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
IFeatureSampling
that has been created
Private Members
-
const IIndexVector &indexVector_¶
-
PredefinedFeatureSampling(const IIndexVector &indexVector)¶