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 rule

  • modelBuilder – 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 space

  • labelIndices – A reference to an object of type IIndexVector that provides access to the indices of the labels for which the rule may predict

  • weights – A reference to an object of type IWeightVector that provides access to the weights of individual training examples

  • partition – 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, respectively

  • featureSampling – A reference to an object of type IFeatureSampling that should be used for sampling the features that may be used by a new condition

  • rulePruning – A reference to an object of type IRulePruning that should be used to prune the rule

  • postProcessor – A reference to an object of type IPostProcessor that should be used to post-process the predictions of the rule

  • rng – A reference to an object of type RNG that implements the random number generator to be used

  • modelBuilder – A reference to an object of type IModelBuilder, the rule should be added to

Returns:

True, if a rule has been induced, false otherwise

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.

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 examples

  • labelMatrix – 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