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
IStatisticsthat 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 &outputIndices, const IWeightVector &weights, IPartition &partition, IFeatureSampling &featureSampling, IModelBuilder &modelBuilder) const = 0¶
Induces a new rule.
- Parameters:
featureSpace – A reference to an object of type
IFeatureSpacethat provides access to the feature spaceoutputIndices – A reference to an object of type
IIndexVectorthat provides access to the indices of the outputs for which the rule may predictweights – A reference to an object of type
IWeightVectorthat provides access to the weights of individual training examplespartition – A reference to an object of type
IPartitionthat 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
IFeatureSamplingthat should be used for sampling the features that may be used by a new conditionmodelBuilder – 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
IRuleInductionthat 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 IOutputMatrix &outputMatrix) const = 0¶
Creates and returns a new object of type
IRuleInductionFactoryaccording to the specified configuration.- Parameters:
featureMatrix – A reference to an object of type
IFeatureMatrixthat provides access to the feature values of the training examplesoutputMatrix – A reference to an object of type
IOutputMatrixthat provides access to the ground truth of the training examples
- Returns:
An unique pointer to an object of type
IRuleInductionFactorythat has been created
-
inline virtual ~IRuleInductionConfig()¶