File rule_refinement.hpp

class IRuleRefinement
#include <rule_refinement.hpp>

Defines an interface for all classes that allow to find the best refinement of existing rules.

Public Functions

inline virtual ~IRuleRefinement()
virtual bool findRefinement(SingleRefinementComparator &comparator, IFeatureSubspace &featureSubspace, const IIndexVector &featureIndices, const IIndexVector &outputIndices, uint32 minCoverage) const = 0

Finds the best refinement of an existing rule.

Parameters:
  • comparator – A reference to an object of type SingleRefinementComparator that should be used for comparing potential refinements

  • featureSubspace – A reference to an object of type IFeatureSubspace that should be used to search for the potential refinements

  • featureIndices – A reference to an object of type IIndexVector that provides access to the indices of the features that should be considered

  • outputIndices – A reference to an object of type IIndexVector that provides access to the indices of the outputs for which the refinement(s) may predict

  • minCoverage – The minimum number of examples that must be covered by the refinements

Returns:

True, if at least one refinement has been found, false otherwise

virtual bool findRefinement(FixedRefinementComparator &comparator, IFeatureSubspace &featureSubspace, const IIndexVector &featureIndices, const IIndexVector &outputIndices, uint32 minCoverage) const = 0

Finds the best refinements of an existing rule.

Parameters:
  • comparator – A reference to an object of type FixedRefinementComparator that should be used for comparing potential refinements

  • featureSubspace – A reference to an object of type IFeatureSubspace that should be used to search for the potential refinements

  • featureIndices – A reference to an object of type IIndexVector that provides access to the indices of the features that should be considered

  • outputIndices – A reference to an object of type IIndexVector that provides access to the indices of the outputs for which the refinement(s) may predict

  • minCoverage – The minimum number of examples that must be covered by the refinements

Returns:

True, if at least one refinement has been found, false otherwise

class IRuleRefinementFactory
#include <rule_refinement.hpp>

Defines an interface for all factories that allow to create instances of the type IRuleRefinement.

Public Functions

inline virtual ~IRuleRefinementFactory()
virtual std::unique_ptr<IRuleRefinement> create() const = 0

Creates and returns a new object of type IRuleRefinement.

Returns:

An unique pointer to an object of type IRuleRefinement that has been created

class IRuleRefinementConfig
#include <rule_refinement.hpp>

Defines an interface for all classes that allow to configure a method for finding the best refinements of existing rules.

Subclassed by StatisticsBasedRuleRefinementConfig

Public Functions

inline virtual ~IRuleRefinementConfig()
virtual std::unique_ptr<IRuleRefinementFactory> createRuleRefinementFactory(const IFeatureMatrix &featureMatrix, uint32 numOutputs) const = 0

Creates and returns an new object of type IRuleRefinementFactory.

Parameters:
  • featureMatrix – A reference to an object of type IFeatureMatrix that provides access to the feature values of the training examples

  • numOutputs – The total number of available outputs

Returns:

An unique pointer to an object of type IRuleRefinementFactory that has been created