File rule_induction.hpp¶
-
class IRuleInduction¶
- #include <rule_induction.hpp>
Defines an interface for all classes that implement an algorithm for the induction of individual rules.
Public Functions
-
inline virtual ~IRuleInduction()¶
-
virtual void induceDefaultRule(IStatistics &statistics, IModelBuilder &modelBuilder) const = 0¶
Induces the default rule.
- Parameters:
statistics – A reference to an object of type
IStatistics
that provides access to the statistics which should serve as the basis for inducing the default rulemodelBuilder – A reference to an object of type
IModelBuilder
, the default rule should be added to
-
virtual bool induceRule(IFeatureSpace &featureSpace, const IIndexVector &labelIndices, const IWeightVector &weights, IPartition &partition, IFeatureSampling &featureSampling, const IRulePruning &rulePruning, const IPostProcessor &postProcessor, RNG &rng, IModelBuilder &modelBuilder) const = 0¶
Induces a new rule.
- Parameters:
featureSpace – A reference to an object of type
IFeatureSpace
that provides access to the feature spacelabelIndices – A reference to an object of type
IIndexVector
that provides access to the indices of the labels for which the rule may predictweights – A reference to an object of type
IWeightVector
that provides access to the weights of individual training examplespartition – 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 the holdout set, respectivelyfeatureSampling – A reference to an object of type
IFeatureSampling
that should be used for sampling the features that may be used by a new conditionrulePruning – A reference to an object of type
IRulePruning
that should be used to prune the rulepostProcessor – A reference to an object of type
IPostProcessor
that should be used to post-process the predictions of the rulerng – A reference to an object of type
RNG
that implements the random number generator to be usedmodelBuilder – A reference to an object of type
IModelBuilder
, the rule should be added to
- Returns:
True, if a rule has been induced, false otherwise
-
inline virtual ~IRuleInduction()¶
-
class IRuleInductionFactory¶
- #include <rule_induction.hpp>
Defines an interface for all factories that allow to create instances of the type
IRuleInduction
.Public Functions
-
inline virtual ~IRuleInductionFactory()¶
-
virtual std::unique_ptr<IRuleInduction> create() const = 0¶
Creates and returns a new object of type
IRuleInduction
.- Returns:
An unique pointer to an object of type
IRuleInduction
that has been created.
-
inline virtual ~IRuleInductionFactory()¶
-
class IRuleInductionConfig¶
- #include <rule_induction.hpp>
Defines an interface for all classes that allow to configure an algorithm for the induction of individual rules.
Subclassed by BeamSearchTopDownRuleInductionConfig, GreedyTopDownRuleInductionConfig
Public Functions
-
inline virtual ~IRuleInductionConfig()¶
-
virtual std::unique_ptr<IRuleInductionFactory> createRuleInductionFactory(const IFeatureMatrix &featureMatrix, const ILabelMatrix &labelMatrix) const = 0¶
Creates and returns a new object of type
IRuleInductionFactory
according to the specified configuration.- Parameters:
featureMatrix – A reference to an object of type
IFeatureMatrix
that provides access to the feature values of the training exampleslabelMatrix – A reference to an object of type
ILabelMatrix
that provides access to the labels of the training examples
- Returns:
An unique pointer to an object of type
IRuleInductionFactory
that has been created
-
inline virtual ~IRuleInductionConfig()¶