File learner.hpp

class ITrainingResult
#include <learner.hpp>

Defines an interface for all classes that provide access to the results of fitting a rule learner to training data. It incorporates the model that has been trained, as well as additional information that is necessary for obtaining predictions for unseen data.

Public Functions

inline virtual ~ITrainingResult()
virtual uint32 getNumLabels() const = 0

Returns the number of labels for which a model has been trained.

Returns:

The number of labels

virtual std::unique_ptr<IRuleModel> &getRuleModel() = 0

Returns the model that has been trained.

Returns:

An unique pointer to an object of type IRuleModel that has been trained

virtual const std::unique_ptr<IRuleModel> &getRuleModel() const = 0

Returns the model that has been trained.

Returns:

An unique pointer to an object of type IRuleModel that has been trained

virtual std::unique_ptr<ILabelSpaceInfo> &getLabelSpaceInfo() = 0

Returns information about the label space that may be used as a basis for making predictions.

Returns:

An unique pointer to an object of type ILabelSpaceInfo that may be used as a basis for making predictions

virtual const std::unique_ptr<ILabelSpaceInfo> &getLabelSpaceInfo() const = 0

Returns information about the label space that may be used as a basis for making predictions.

Returns:

An unique pointer to an object of type ILabelSpaceInfo that may be used as a basis for making predictions

virtual std::unique_ptr<IMarginalProbabilityCalibrationModel> &getMarginalProbabilityCalibrationModel() = 0

Returns a model that may be used for the calibration of marginal probabilities.

Returns:

An unique pointer to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

virtual const std::unique_ptr<IMarginalProbabilityCalibrationModel> &getMarginalProbabilityCalibrationModel() const = 0

Returns a model that may be used for the calibration of marginal probabilities.

Returns:

An unique pointer to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

virtual std::unique_ptr<IJointProbabilityCalibrationModel> &getJointProbabilityCalibrationModel() = 0

Returns a model that may be used for the calibration of joint probabilities.

Returns:

An unique pointer to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

virtual const std::unique_ptr<IJointProbabilityCalibrationModel> &getJointProbabilityCalibrationModel() const = 0

Returns a model that may be used for the calibration of joint probabilities.

Returns:

An unique pointer to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

class IRuleLearner
#include <learner.hpp>

Defines an interface for all rule learners.

Subclassed by AbstractRuleLearner

Public Functions

inline virtual ~IRuleLearner()
virtual std::unique_ptr<ITrainingResult> fit(const IFeatureInfo &featureInfo, const IColumnWiseFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix, uint32 randomState) const = 0

Applies the rule learner to given training examples and corresponding ground truth labels.

Parameters:
  • featureInfo – A reference to an object of type IFeatureInfo that provides information about the types of individual features

  • featureMatrix – A reference to an object of type IColumnWiseFeatureMatrix that provides column-wise access to the feature values of the training examples

  • labelMatrix – A reference to an object of type IRowWiseLabelMatrix that provides row-wise access to the ground truth labels of the training examples

  • randomState – The seed to be used by random number generators

Returns:

An unique pointer to an object of type ITrainingResult that provides access to the results of fitting the rule learner to the training data

virtual bool canPredictBinary(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const = 0

Returns whether the rule learner is able to predict binary labels or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

True, if the rule learner is able to predict binary labels, false otherwise

virtual bool canPredictBinary(const IRowWiseFeatureMatrix &featureMatrix, uint32 numLabels) const = 0

Returns whether the rule learner is able to predict binary labels or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • numLabels – The number of labels to predict for

Returns:

True, if the rule learner is able to predict binary labels, false otherwise

virtual std::unique_ptr<IBinaryPredictor> createBinaryPredictor(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const = 0

Creates and returns a predictor that may be used to predict binary labels for given query examples. If the prediction of binary labels is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of binary labels is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

An unique pointer to an object of type IBinaryPredictor that may be used to predict binary labels for the given query examples

virtual std::unique_ptr<IBinaryPredictor> createBinaryPredictor(const IRowWiseFeatureMatrix &featureMatrix, const IRuleModel &ruleModel, const ILabelSpaceInfo &labelSpaceInfo, const IMarginalProbabilityCalibrationModel &marginalProbabilityCalibrationModel, const IJointProbabilityCalibrationModel &jointProbabilityCalibrationModel, uint32 numLabels) const = 0

Creates and returns a predictor that may be used to predict binary labels for given query examples. If the prediction of binary labels is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of binary labels is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • ruleModel – A reference to an object of type IRuleModel that should be used to obtain predictions

  • labelSpaceInfo – A reference to an object of type ILabelSpaceInfo that provides information about the label space that may be used as a basis for obtaining predictions

  • marginalProbabilityCalibrationModel – A reference to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

  • jointProbabilityCalibrationModel – A reference to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type IBinaryPredictor that may be used to predict binary labels for the given query examples

virtual std::unique_ptr<ISparseBinaryPredictor> createSparseBinaryPredictor(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const = 0

Creates and returns a predictor that may be used to predict sparse binary labels for given query examples. If the prediction of sparse binary labels is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of sparse binary labels is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

An unique pointer to an object of type ISparseBinaryPredictor that may be used to predict sparse binary labels for the given query examples

virtual std::unique_ptr<ISparseBinaryPredictor> createSparseBinaryPredictor(const IRowWiseFeatureMatrix &featureMatrix, const IRuleModel &ruleModel, const ILabelSpaceInfo &labelSpaceInfo, const IMarginalProbabilityCalibrationModel &marginalProbabilityCalibrationModel, const IJointProbabilityCalibrationModel &jointProbabilityCalibrationModel, uint32 numLabels) const = 0

Creates and returns a predictor that may be used to predict sparse binary labels for given query examples. If the prediction of sparse binary labels is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of sparse binary labels is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • ruleModel – A reference to an object of type IRuleModel that should be used to obtain predictions

  • labelSpaceInfo – A reference to an object of type ILabelSpaceInfo that provides information about the label space that may be used as a basis for obtaining predictions

  • marginalProbabilityCalibrationModel – A reference to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

  • jointProbabilityCalibrationModel – A reference to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type ISparseBinaryPredictor that may be used to predict sparse binary labels for the given query examples

virtual bool canPredictScores(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const = 0

Returns whether the rule learner is able to predict regression scores or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

True, if the rule learner is able to predict regression scores, false otherwise

virtual bool canPredictScores(const IRowWiseFeatureMatrix &featureMatrix, uint32 numLabels) const = 0

Returns whether the rule learner is able to predict regression scores or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • numLabels – The number of labels to predict for

Returns:

True, if the rule learner is able to predict regression scores, false otherwise

virtual std::unique_ptr<IScorePredictor> createScorePredictor(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const = 0

Creates and returns a predictor that may be used to predict regression scores for given query examples. If the prediction of regression scores is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of regression scores is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

An unique pointer to an object of type IScorePredictor that may be used to predict regression scores for the given query examples

virtual std::unique_ptr<IScorePredictor> createScorePredictor(const IRowWiseFeatureMatrix &featureMatrix, const IRuleModel &ruleModel, const ILabelSpaceInfo &labelSpaceInfo, uint32 numLabels) const = 0

Creates and returns a predictor that may be used to predict regression scores for given query examples. If the prediction of regression scores is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of regression scores is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • ruleModel – A reference to an object of type IRuleModel that should be used to obtain predictions

  • labelSpaceInfo – A reference to an object of type ILabelSpaceInfo that provides information about the label space that may be used as a basis for obtaining predictions

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type IScorePredictor that may be used to predict regression scores for the given query examples

virtual bool canPredictProbabilities(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const = 0

Returns whether the rule learner is able to predict probabilities or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

True, if the rule learner is able to predict probabilities, false otherwise

virtual bool canPredictProbabilities(const IRowWiseFeatureMatrix &featureMatrix, uint32 numLabels) const = 0

Returns whether the rule learner is able to predict probabilities or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • numLabels – The number of labels to predict for

Returns:

True, if the rule learner is able to predict probabilities, false otherwise

virtual std::unique_ptr<IProbabilityPredictor> createProbabilityPredictor(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const = 0

Creates and returns a predictor that may be used to predict probability estimates for given query examples. If the prediction of probability estimates is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of probability estimates is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

An unique pointer to an object of type IProbabilityPredictor that may be used to predict probability estimates for the given query examples

virtual std::unique_ptr<IProbabilityPredictor> createProbabilityPredictor(const IRowWiseFeatureMatrix &featureMatrix, const IRuleModel &ruleModel, const ILabelSpaceInfo &labelSpaceInfo, const IMarginalProbabilityCalibrationModel &marginalProbabilityCalibrationModel, const IJointProbabilityCalibrationModel &jointProbabilityCalibrationModel, uint32 numLabels) const = 0

Creates and returns a predictor that may be used to predict probability estimates for given query examples. If the prediction of probability estimates is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of probability estimates is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • ruleModel – A reference to an object of type IRuleModel that should be used to obtain predictions

  • labelSpaceInfo – A reference to an object of type ILabelSpaceInfo that provides information about the label space that may be used as a basis for obtaining predictions

  • marginalProbabilityCalibrationModel – A reference to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

  • jointProbabilityCalibrationModel – A reference to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type IProbabilityPredictor that may be used to predict probability estimates for the given query examples

class IBeamSearchTopDownRuleInductionMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use a top-down beam search.

Public Functions

inline virtual ~IBeamSearchTopDownRuleInductionMixin() override
inline virtual IBeamSearchTopDownRuleInductionConfig &useBeamSearchTopDownRuleInduction()

Configures the rule learner to use a top-down beam search for the induction of individual rules.

Returns:

A reference to an object of type IBeamSearchTopDownRuleInduction that allows further configuration of the algorithm for the induction of individual rules

class IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner.

Subclassed by AbstractRuleLearner::Config, IRuleLearner::IBeamSearchTopDownRuleInductionMixin, IRuleLearner::IDefaultRuleMixin, IRuleLearner::IEqualFrequencyFeatureBinningMixin, IRuleLearner::IEqualWidthFeatureBinningMixin, IRuleLearner::IExampleWiseStratifiedBiPartitionSamplingMixin, IRuleLearner::IExampleWiseStratifiedInstanceSamplingMixin, IRuleLearner::IFeatureSamplingWithoutReplacementMixin, IRuleLearner::IGreedyTopDownRuleInductionMixin, IRuleLearner::IInstanceSamplingWithReplacementMixin, IRuleLearner::IInstanceSamplingWithoutReplacementMixin, IRuleLearner::IIrepRulePruningMixin, IRuleLearner::ILabelSamplingWithoutReplacementMixin, IRuleLearner::ILabelWiseStratifiedBiPartitionSamplingMixin, IRuleLearner::ILabelWiseStratifiedInstanceSamplingMixin, IRuleLearner::INoFeatureBinningMixin, IRuleLearner::INoFeatureSamplingMixin, IRuleLearner::INoGlobalPruningMixin, IRuleLearner::INoInstanceSamplingMixin, IRuleLearner::INoJointProbabilityCalibrationMixin, IRuleLearner::INoLabelSamplingMixin, IRuleLearner::INoMarginalProbabilityCalibrationMixin, IRuleLearner::INoParallelPredictionMixin, IRuleLearner::INoParallelRuleRefinementMixin, IRuleLearner::INoParallelStatisticUpdateMixin, IRuleLearner::INoPartitionSamplingMixin, IRuleLearner::INoPostProcessorMixin, IRuleLearner::INoRulePruningMixin, IRuleLearner::INoSequentialPostOptimizationMixin, IRuleLearner::INoSizeStoppingCriterionMixin, IRuleLearner::INoTimeStoppingCriterionMixin, IRuleLearner::IParallelPredictionMixin, IRuleLearner::IParallelRuleRefinementMixin, IRuleLearner::IParallelStatisticUpdateMixin, IRuleLearner::IPostPruningMixin, IRuleLearner::IPrePruningMixin, IRuleLearner::IRandomBiPartitionSamplingMixin, IRuleLearner::IRoundRobinLabelSamplingMixin, IRuleLearner::ISequentialPostOptimizationMixin, IRuleLearner::ISequentialRuleModelAssemblageMixin, IRuleLearner::ISizeStoppingCriterionMixin, IRuleLearner::ITimeStoppingCriterionMixin

Public Functions

inline virtual ~IConfig()

Protected Functions

virtual RuleCompareFunction getRuleCompareFunction() const = 0

Returns the definition of the function that should be used for comparing the quality of different rules.

Returns:

An object of type RuleCompareFunction that defines the function that should be used for comparing the quality of different rules

virtual std::unique_ptr<IDefaultRuleConfig> &getDefaultRuleConfigPtr() = 0

Returns an unique pointer to the configuration of the default that is included in a rule-based model.

Returns:

A reference to an unique pointer of type IDefaultRuleConfig that stores the configuration of the default rule that is included in a rule-based model

virtual std::unique_ptr<IRuleModelAssemblageConfig> &getRuleModelAssemblageConfigPtr() = 0

Returns an unique pointer to the configuration of the algorithm for the induction of several rules that are added to a rule-based model.

Returns:

A reference to an unique pointer of type IRuleModelAssemblageConfig that stores the configuration of the algorithm for the induction of several rules that are added to a rule-based model

virtual std::unique_ptr<IRuleInductionConfig> &getRuleInductionConfigPtr() = 0

Returns an unique pointer to the configuration of the algorithm for the induction of individual rules.

Returns:

A reference to an unique pointer of type IRuleInductionConfig that stores the configuration of the algorithm for the induction of individual rules

virtual std::unique_ptr<IFeatureBinningConfig> &getFeatureBinningConfigPtr() = 0

Returns an unique pointer to the configuration of the method for the assignment of numerical feature values to bins.

Returns:

A reference to an unique pointer of type IFeatureBinningConfig that stores the configuration of the method for the assignment of numerical feature values to bins

virtual std::unique_ptr<ILabelSamplingConfig> &getLabelSamplingConfigPtr() = 0

Returns an unique pointer to the configuration of the method for sampling labels.

Returns:

A reference to an unique pointer of type ILabelSamplingConfig that stores the configuration of the method for sampling labels

virtual std::unique_ptr<IInstanceSamplingConfig> &getInstanceSamplingConfigPtr() = 0

Returns an unique pointer to the configuration of the method for sampling instances.

Returns:

A reference to an unique pointer of type IInstanceSamplingConfig that stores the configuration of the method for sampling instances

virtual std::unique_ptr<IFeatureSamplingConfig> &getFeatureSamplingConfigPtr() = 0

Returns an unique pointer to the configuration of the method for sampling features.

Returns:

A reference to an unique pointer of type IFeatureSamplingConfig that specifies the configuration of the method for sampling features

virtual std::unique_ptr<IPartitionSamplingConfig> &getPartitionSamplingConfigPtr() = 0

Returns an unique pointer to the configuration of the method for partitioning the available training examples into a training set and a holdout set.

Returns:

A reference to an unique pointer of type IPartitionSamplingConfig that stores the configuration of the method for partitioning the available training examples into a training set and a holdout set

virtual std::unique_ptr<IRulePruningConfig> &getRulePruningConfigPtr() = 0

Returns an unique pointer to the configuration of the method for pruning individual rules.

Returns:

A reference to an unique pointer of type IRulePruningConfig that stores the configuration of the method for pruning individual rules

virtual std::unique_ptr<IPostProcessorConfig> &getPostProcessorConfigPtr() = 0

Returns an unique pointer to the configuration of the method for post-processing the predictions of rules once they have been learned.

Returns:

A reference to an unique pointer of type IPostProcessorConfig that stores the configuration of the method that post-processes the predictions of rules once they have been learned

virtual std::unique_ptr<IMultiThreadingConfig> &getParallelRuleRefinementConfigPtr() = 0

Returns an unique pointer to the configuration of the multi-threading behavior that is used for the parallel refinement of rules.

Returns:

A reference to an unique pointer of type IMultiThreadingConfig that stores the configuration of the multi-threading behavior that is used for the parallel refinement of rules

virtual std::unique_ptr<IMultiThreadingConfig> &getParallelStatisticUpdateConfigPtr() = 0

Returns an unique pointer to the the configuration of the multi-threading behavior that is used for the parallel update of statistics.

Returns:

A reference to an unique pointer of type IMultiThreadingConfig that stores the configuration of the multi-threading behavior that is used for the parallel update of statistics

virtual std::unique_ptr<IMultiThreadingConfig> &getParallelPredictionConfigPtr() = 0

Returns an unique pointer to the configuration of the multi-threading behavior that is used to predict for several query examples in parallel.

Returns:

A reference to an unique pointer of type IMultiThreadingConfig that stores the configuration of the multi-threading behavior that is used to predict for several query examples in parallel

virtual std::unique_ptr<SizeStoppingCriterionConfig> &getSizeStoppingCriterionConfigPtr() = 0

Returns an unique pointer to the configuration of the stopping criterion that ensures that the number of rules does not exceed a certain maximum.

Returns:

A reference to an unique pointer of type SizeStoppingCriterionConfig that stores the configuration of the stopping criterion that ensures that the number of rules does not exceed a certain maximum or a null pointer, if no such stopping criterion should be used

virtual std::unique_ptr<TimeStoppingCriterionConfig> &getTimeStoppingCriterionConfigPtr() = 0

Returns an unique pointer to the configuration of the stopping criterion that ensures that a certain time limit is not exceeded.

Returns:

A reference to an unique pointer of type TimeStoppingCriterionConfig that stores the configuration of the stopping criterion that ensures that a certain time limit is not exceeded or a null pointer, if no such stopping criterion should be used

virtual std::unique_ptr<IGlobalPruningConfig> &getGlobalPruningConfigPtr() = 0

Returns an unique pointer to the configuration of the stopping criterion that allows to decide how many rules should be included in a model, such that its performance is optimized globally.

Returns:

A reference to an unique pointer of type IGlobalPruningConfig that stores the configuration of the stopping criterion that allows to decide how many rules should be included in a model, such that its performance is optimized globally, or a null pointer, if no such stopping criterion should be used

virtual std::unique_ptr<SequentialPostOptimizationConfig> &getSequentialPostOptimizationConfigPtr() = 0

Returns an unique pointer to the configuration of the post-optimization method that optimizes each rule in a model by relearning it in the context of the other rules.

Returns:

A reference to an unique pointer of type SequentialPostOptimizationConfig that stores the configuration of the post-optimization method that optimizes each rule in a model by relearning it in the context of the other rules or a null pointer, if no such post-optimization method should be used

virtual std::unique_ptr<UnusedRuleRemovalConfig> &getUnusedRuleRemovalConfigPtr() = 0

Returns an unique pointer to the configuration of the post-optimization method that removes unused rules from a model.

Returns:

A reference to an unique pointer of type UnusedRuleRemovalConfig that stores the configuration of the post-optimization method that removes unused rules from a model or a null pointer, if no such post-optimization method should be used

virtual std::unique_ptr<IMarginalProbabilityCalibratorConfig> &getMarginalProbabilityCalibratorConfigPtr() = 0

Returns an unique pointer to the configuration of the calibrator that allows to fit a model for the calibration of marginal probabilities.

Returns:

A reference to an unique pointer of type IMarginalProbabilityCalibratorConfig that stores the configuration of the calibrator that allows to fit a model for the calibration of marginal probabilities

virtual std::unique_ptr<IJointProbabilityCalibratorConfig> &getJointProbabilityCalibratorConfigPtr() = 0

Returns an unique pointer to the configuration of the calibrator that allows to fit a model for the calibration of joint probabilities.

Returns:

A reference to an unique pointer of type IJointProbabilityCalibratorConfig that stores the configuration of the calibrator that allows to fit a model for the calibration of joint probabilities

virtual std::unique_ptr<IBinaryPredictorConfig> &getBinaryPredictorConfigPtr() = 0

Returns an unique pointer to the configuration of the predictor that allows to predict binary labels.

Returns:

A reference to an unique pointer of type IBinaryPredictorConfig that stores the configuration of the predictor that allows to predict binary labels or a null pointer if the prediction of binary labels is not supported

virtual std::unique_ptr<IScorePredictorConfig> &getScorePredictorConfigPtr() = 0

Returns an unique pointer to the configuration of the predictor that allows to predict regression scores.

Returns:

A reference to an unique pointer of type IScorePredictorConfig that stores the configuration of the predictor that allows to predict regression scores or a null pointer, if the prediction of regression scores is not supported

virtual std::unique_ptr<IProbabilityPredictorConfig> &getProbabilityPredictorConfigPtr() = 0

Returns an unique pointer to the configuration of the predictor that allows to predict probability estimates.

Returns:

A reference to an unique pointer of type IProbabilityPredictorConfig that stores the configuration of the predictor that allows to predict probability estimates or a null pointer, if the prediction of probability estimates is not supported

Friends

friend class AbstractRuleLearner
class IDefaultRuleMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to induce a default rule.

Public Functions

inline virtual ~IDefaultRuleMixin() override
inline virtual void useDefaultRule()

Configures the rule learner to induce a default rule.

class IEqualFrequencyFeatureBinningMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use equal-frequency feature binning.

Public Functions

inline virtual ~IEqualFrequencyFeatureBinningMixin() override
inline virtual IEqualFrequencyFeatureBinningConfig &useEqualFrequencyFeatureBinning()

Configures the rule learner to use a method for the assignment of numerical feature values to bins, such that each bin contains approximately the same number of values.

Returns:

A reference to an object of type IEqualFrequencyFeatureBinningConfig that allows further configuration of the method for the assignment of numerical feature values to bins

class IEqualWidthFeatureBinningMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use equal-width feature binning.

Public Functions

inline virtual ~IEqualWidthFeatureBinningMixin() override
inline virtual IEqualWidthFeatureBinningConfig &useEqualWidthFeatureBinning()

Configures the rule learner to use a method for the assignment of numerical feature values to bins, such that each bin contains values from equally sized value ranges.

Returns:

A reference to an object of type IEqualWidthFeatureBinningConfig that allows further configuration of the method for the assignment of numerical feature values to bins

class IExampleWiseStratifiedBiPartitionSamplingMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to partition the available training examples into a training set and a holdout set using stratification, where distinct label vectors are treated as individual classes.

Public Functions

inline virtual ~IExampleWiseStratifiedBiPartitionSamplingMixin() override
inline virtual IExampleWiseStratifiedBiPartitionSamplingConfig &useExampleWiseStratifiedBiPartitionSampling()

Configures the rule learner to partition the available training examples into a training set and a holdout set using stratification, where distinct label vectors are treated as individual classes

Returns:

A reference to an object of type IExampleWiseStratifiedBiPartitionSamplingConfig that allows further configuration of the method for partitioning the available training examples into a training and a holdout set

class IExampleWiseStratifiedInstanceSamplingMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use example-wise stratified instance sampling.

Public Functions

inline virtual ~IExampleWiseStratifiedInstanceSamplingMixin() override
inline virtual IExampleWiseStratifiedInstanceSamplingConfig &useExampleWiseStratifiedInstanceSampling()

Configures the rule learner to sample from the available training examples using stratification, where distinct label vectors are treated as individual classes, whenever a new rule should be learned.

Returns:

A reference to an object of type IExampleWiseStratifiedInstanceSamplingConfig that allows further configuration of the method for sampling instances

class IFeatureSamplingWithoutReplacementMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use feature sampling without replacement.

Public Functions

inline virtual ~IFeatureSamplingWithoutReplacementMixin() override
inline virtual IFeatureSamplingWithoutReplacementConfig &useFeatureSamplingWithoutReplacement()

Configures the rule learner to sample from the available features with replacement whenever a rule should be refined.

Returns:

A reference to an object of type IFeatureSamplingWithoutReplacementConfig that allows further configuration of the method for sampling features

class IGreedyTopDownRuleInductionMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use a greedy top-down search for the induction of individual rules.

Public Functions

inline virtual ~IGreedyTopDownRuleInductionMixin() override
inline virtual IGreedyTopDownRuleInductionConfig &useGreedyTopDownRuleInduction()

Configures the rule learner to use a greedy top-down search for the induction of individual rules.

Returns:

A reference to an object of type IGreedyTopDownRuleInductionConfig that allows further configuration of the algorithm for the induction of individual rules

class IInstanceSamplingWithoutReplacementMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use instance sampling without replacement.

Public Functions

inline virtual ~IInstanceSamplingWithoutReplacementMixin() override
inline virtual IInstanceSamplingWithoutReplacementConfig &useInstanceSamplingWithoutReplacement()

Configures the rule learner to sample from the available training examples without replacement whenever a new rule should be learned.

Returns:

A reference to an object of type IInstanceSamplingWithoutReplacementConfig that allows further configuration of the method for sampling instances

class IInstanceSamplingWithReplacementMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use instance sampling with replacement.

Public Functions

inline virtual ~IInstanceSamplingWithReplacementMixin() override
inline virtual IInstanceSamplingWithReplacementConfig &useInstanceSamplingWithReplacement()

Configures the rule learner to sample from the available training examples with replacement whenever a new rule should be learned.

Returns:

A reference to an object of type IInstanceSamplingWithReplacementConfig that allows further configuration of the method for sampling instances

class IIrepRulePruningMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to prune individual rules by following the principles of “incremental reduced error pruning” (IREP).

Public Functions

inline virtual ~IIrepRulePruningMixin() override
inline virtual void useIrepRulePruning()

Configures the rule learner to prune individual rules by following the principles of “incremental

reduced error pruning” (IREP).

class ILabelSamplingWithoutReplacementMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use label sampling without replacement.

Public Functions

inline virtual ~ILabelSamplingWithoutReplacementMixin() override
inline virtual ILabelSamplingWithoutReplacementConfig &useLabelSamplingWithoutReplacement()

Configures the rule learner to sample from the available labels with replacement whenever a new rule should be learned.

Returns:

A reference to an object of type ILabelSamplingWithoutReplacementConfig that allows further configuration of the method for sampling labels

class ILabelWiseStratifiedBiPartitionSamplingMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to partition the available training examples into a training set and a holdout set using stratification, such that for each label the proportion of relevant and irrelevant examples is maintained.

Public Functions

inline virtual ~ILabelWiseStratifiedBiPartitionSamplingMixin() override
inline virtual ILabelWiseStratifiedBiPartitionSamplingConfig &useLabelWiseStratifiedBiPartitionSampling()

Configures the rule learner to partition the available training examples into a training set and a holdout set using stratification, such that for each label the proportion of relevant and irrelevant examples is maintained.

Returns:

A reference to an object of type ILabelWiseStratifiedBiPartitionSamplingConfig that allows further configuration of the method for partitioning the available training examples into a training and a holdout set

class ILabelWiseStratifiedInstanceSamplingMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use label-wise stratified instance sampling.

Public Functions

inline virtual ~ILabelWiseStratifiedInstanceSamplingMixin() override
inline virtual ILabelWiseStratifiedInstanceSamplingConfig &useLabelWiseStratifiedInstanceSampling()

Configures the rule learner to sample from the available training examples using stratification, such that for each label the proportion of relevant and irrelevant examples is maintained, whenever a new rule should be learned.

Returns:

A reference to an object of type ILabelWiseStratifiedInstanceSamplingConfig that allows further configuration of the method for sampling instances

class INoFeatureBinningMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use any method for the assignment of numerical features values to bins.

Public Functions

inline virtual ~INoFeatureBinningMixin() override
inline virtual void useNoFeatureBinning()

Configures the rule learner to not use any method for the assignment of numerical feature values to bins.

class INoFeatureSamplingMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use feature sampling.

Public Functions

inline virtual ~INoFeatureSamplingMixin() override
inline virtual void useNoFeatureSampling()

Configures the rule learner to not sample from the available features whenever a rule should be refined.

class INoGlobalPruningMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use global pruning.

Public Functions

inline virtual ~INoGlobalPruningMixin() override
inline virtual void useNoGlobalPruning()

Configures the rule learner to not use global pruning.

class INoInstanceSamplingMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use instance sampling.

Public Functions

inline virtual ~INoInstanceSamplingMixin() override
inline virtual void useNoInstanceSampling()

Configures the rule learner to not sample from the available training examples whenever a new rule should be learned.

class INoJointProbabilityCalibrationMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not calibrate joint probabilities.

Public Functions

inline virtual ~INoJointProbabilityCalibrationMixin() override
inline virtual void useNoJointProbabilityCalibration()

Configures the rule learner to not calibrate joint probabilities.

class INoLabelSamplingMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use label sampling.

Public Functions

inline virtual ~INoLabelSamplingMixin() override
inline virtual void useNoLabelSampling()

Configures the rule learner to not sample from the available labels whenever a new rule should be learned.

class INoMarginalProbabilityCalibrationMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not calibrate marginal probabilities.

Public Functions

inline virtual ~INoMarginalProbabilityCalibrationMixin() override
inline virtual void useNoMarginalProbabilityCalibration()

Configures the rule learner to not calibrate marginal probabilities.

class INoParallelPredictionMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use any multi-threading for prediction.

Public Functions

inline virtual ~INoParallelPredictionMixin() override
inline virtual void useNoParallelPrediction()

Configures the rule learner to not use any multi-threading to predict for several query examples in parallel.

class INoParallelRuleRefinementMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use any multi-threading for the parallel refinement of rules.

Public Functions

inline virtual ~INoParallelRuleRefinementMixin() override
inline virtual void useNoParallelRuleRefinement()

Configures the rule learner to not use any multi-threading for the parallel refinement of rules.

class INoParallelStatisticUpdateMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use any multi-threading for the parallel update of statistics.

Public Functions

inline virtual ~INoParallelStatisticUpdateMixin() override
inline virtual void useNoParallelStatisticUpdate()

Configures the rule learner to not use any multi-threading for the parallel update of statistics.

class INoPartitionSamplingMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not partition the available training examples into a training set and a holdout set.

Public Functions

inline virtual ~INoPartitionSamplingMixin() override
inline virtual void useNoPartitionSampling()

Configures the rule learner to not partition the available training examples into a training set and a holdout set.

class INoPostProcessorMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use any post processor.

Public Functions

inline virtual ~INoPostProcessorMixin() override
inline virtual void useNoPostProcessor()

Configures the rule learner to not use any post processor.

class INoRulePruningMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not prune individual rules.

Public Functions

inline virtual ~INoRulePruningMixin() override
inline virtual void useNoRulePruning()

Configures the rule learner to not prune individual rules.

class INoSequentialPostOptimizationMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use a post-optimization method that optimizes each rule in a model by relearning it in the context of the other rules.

Public Functions

inline virtual ~INoSequentialPostOptimizationMixin() override
inline virtual void useNoSequentialPostOptimization()

Configures the rule learner to not use a post-optimization method that optimizes each rule in a model by relearning it in the context of the other rules.

class INoSizeStoppingCriterionMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use a stopping criterion that ensures that the number of induced rules does not exceed a certain maximum.

Public Functions

inline virtual ~INoSizeStoppingCriterionMixin() override
inline virtual void useNoSizeStoppingCriterion()

Configures the rule learner to not use a stopping criterion that ensures that the number of induced rules does not exceed a certain maximum.

class INoTimeStoppingCriterionMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to not use a stopping criterion that ensures that a certain time limit is not exceeded.

Public Functions

inline virtual ~INoTimeStoppingCriterionMixin() override
inline virtual void useNoTimeStoppingCriterion()

Configures the rule learner to not use a stopping criterion that ensures that a certain time limit is not exceeded.

class IParallelPredictionMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use multi-threading to predict for several examples in parallel.

Public Functions

inline virtual ~IParallelPredictionMixin() override
inline virtual IManualMultiThreadingConfig &useParallelPrediction()

Configures the rule learner to use multi-threading to predict for several query examples in parallel.

Returns:

A reference to an object of type IManualMultiThreadingConfig that allows further configuration of the multi-threading behavior

class IParallelRuleRefinementMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use multi-threading for the parallel refinement of rules.

Public Functions

inline virtual ~IParallelRuleRefinementMixin() override
inline virtual IManualMultiThreadingConfig &useParallelRuleRefinement()

Configures the rule learner to use multi-threading for the parallel refinement of rules.

Returns:

A reference to an object of type IManualMultiThreadingConfig that allows further configuration of the multi-threading behavior

class IParallelStatisticUpdateMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use multi-threading for the parallel update of statistics.

Public Functions

inline virtual ~IParallelStatisticUpdateMixin() override
inline virtual IManualMultiThreadingConfig &useParallelStatisticUpdate()

Configures the rule learner to use multi-threading for the parallel update of statistics.

Returns:

A reference to an object of type IManualMultiThreadingConfig that allows further configuration of the multi-threading behavior

class IPostPruningMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use a stopping criterion that keeps track of the number of rules in a model that perform best with respect to the examples in the training or holdout set according to a certain measure.

Public Functions

inline virtual ~IPostPruningMixin() override
inline virtual IPostPruningConfig &useGlobalPostPruning()

Configures the rule learner to use a stopping criterion that keeps track of the number of rules in a model that perform best with respect to the examples in the training or holdout set according to a certain measure.

class IPrePruningMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use a stopping criterion that stops the induction of rules as soon as the quality of a model’s predictions for the examples in the training or holdout set do not improve according to a certain measure.

Public Functions

inline virtual ~IPrePruningMixin() override
inline virtual IPrePruningConfig &useGlobalPrePruning()

Configures the rule learner to use a stopping criterion that stops the induction of rules as soon as the quality of a model’s predictions for the examples in the training or holdout set do not improve according to a certain measure.

Returns:

A reference to an object of the type IPrePruningConfig that allows further configuration of the stopping criterion

class IRandomBiPartitionSamplingMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to partition the available training example into a training set and a holdout set by randomly splitting the training examples into two mutually exclusive sets.

Public Functions

inline virtual ~IRandomBiPartitionSamplingMixin() override
inline virtual IRandomBiPartitionSamplingConfig &useRandomBiPartitionSampling()

Configures the rule learner to partition the available training examples into a training set and a holdout set by randomly splitting the training examples into two mutually exclusive sets.

Returns:

A reference to an object of type IRandomBiPartitionSamplingConfig that allows further configuration of the method for partitioning the available training examples into a training set and a holdout set

class IRoundRobinLabelSamplingMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to sample single labels in a round-robin fashion.

Public Functions

inline virtual ~IRoundRobinLabelSamplingMixin() override
inline virtual void useRoundRobinLabelSampling()

Configures the rule learner to sample a single labels in a round-robin fashion whenever a new rule should be learned.

class ISequentialPostOptimizationMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use a post-optimization method that optimizes each rule in a model by relearning it in the context of the other rules.

Public Functions

inline virtual ~ISequentialPostOptimizationMixin() override
inline virtual ISequentialPostOptimizationConfig &useSequentialPostOptimization()

Configures the rule learner to use a post-optimization method that optimizes each rule in a model by relearning it in the context of the other rules.

Returns:

A reference to an object of type ISequentialPostOptimizationConfig that allows further configuration of the post-optimization method

class ISequentialRuleModelAssemblageMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use an algorithm that sequentially induces several rules.

Public Functions

inline virtual ~ISequentialRuleModelAssemblageMixin() override
inline virtual void useSequentialRuleModelAssemblage()

Configures the rule learner to use an algorithm that sequentially induces several rules, optionally starting with a default rule, that are added to a rule-based model.

class ISizeStoppingCriterionMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use a stopping criterion that ensures that the number of induced rules does not exceed a certain maximum.

Public Functions

inline virtual ~ISizeStoppingCriterionMixin() override
inline virtual ISizeStoppingCriterionConfig &useSizeStoppingCriterion()

Configures the rule learner to use a stopping criterion that ensures that the number of induced rules does not exceed a certain maximum.

Returns:

A reference to an object of type ISizeStoppingCriterionConfig that allows further configuration of the stopping criterion

class ITimeStoppingCriterionMixin : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Defines an interface for all classes that allow to configure a rule learner to use a stopping criterion that ensures that a certain time limit is not exceeded.

Public Functions

inline virtual ~ITimeStoppingCriterionMixin() override
inline virtual ITimeStoppingCriterionConfig &useTimeStoppingCriterion()

Configures the rule learner to use a stopping criterion that ensures that a certain time limit is not exceeded.

Returns:

A reference to an object of type ITimeStoppingCriterionConfig that allows further configuration of the stopping criterion

class AbstractRuleLearner : public virtual IRuleLearner
#include <learner.hpp>

An abstract base class for all rule learners.

Public Functions

explicit AbstractRuleLearner(IRuleLearner::IConfig &config)
Parameters:

config – A reference to an object of type IRuleLearner::IConfig that specifies the configuration that should be used by the rule learner

virtual std::unique_ptr<ITrainingResult> fit(const IFeatureInfo &featureInfo, const IColumnWiseFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix, uint32 randomState) const override

Applies the rule learner to given training examples and corresponding ground truth labels.

Parameters:
  • featureInfo – A reference to an object of type IFeatureInfo that provides information about the types of individual features

  • featureMatrix – A reference to an object of type IColumnWiseFeatureMatrix that provides column-wise access to the feature values of the training examples

  • labelMatrix – A reference to an object of type IRowWiseLabelMatrix that provides row-wise access to the ground truth labels of the training examples

  • randomState – The seed to be used by random number generators

Returns:

An unique pointer to an object of type ITrainingResult that provides access to the results of fitting the rule learner to the training data

virtual bool canPredictBinary(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const override

Returns whether the rule learner is able to predict binary labels or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

True, if the rule learner is able to predict binary labels, false otherwise

virtual bool canPredictBinary(const IRowWiseFeatureMatrix &featureMatrix, uint32 numLabels) const override

Returns whether the rule learner is able to predict binary labels or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • numLabels – The number of labels to predict for

Returns:

True, if the rule learner is able to predict binary labels, false otherwise

virtual std::unique_ptr<IBinaryPredictor> createBinaryPredictor(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const override

Creates and returns a predictor that may be used to predict binary labels for given query examples. If the prediction of binary labels is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of binary labels is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

An unique pointer to an object of type IBinaryPredictor that may be used to predict binary labels for the given query examples

virtual std::unique_ptr<IBinaryPredictor> createBinaryPredictor(const IRowWiseFeatureMatrix &featureMatrix, const IRuleModel &ruleModel, const ILabelSpaceInfo &labelSpaceInfo, const IMarginalProbabilityCalibrationModel &marginalProbabilityCalibrationModel, const IJointProbabilityCalibrationModel &jointProbabilityCalibrationModel, uint32 numLabels) const override

Creates and returns a predictor that may be used to predict binary labels for given query examples. If the prediction of binary labels is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of binary labels is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • ruleModel – A reference to an object of type IRuleModel that should be used to obtain predictions

  • labelSpaceInfo – A reference to an object of type ILabelSpaceInfo that provides information about the label space that may be used as a basis for obtaining predictions

  • marginalProbabilityCalibrationModel – A reference to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

  • jointProbabilityCalibrationModel – A reference to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type IBinaryPredictor that may be used to predict binary labels for the given query examples

virtual std::unique_ptr<ISparseBinaryPredictor> createSparseBinaryPredictor(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const override

Creates and returns a predictor that may be used to predict sparse binary labels for given query examples. If the prediction of sparse binary labels is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of sparse binary labels is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

An unique pointer to an object of type ISparseBinaryPredictor that may be used to predict sparse binary labels for the given query examples

virtual std::unique_ptr<ISparseBinaryPredictor> createSparseBinaryPredictor(const IRowWiseFeatureMatrix &featureMatrix, const IRuleModel &ruleModel, const ILabelSpaceInfo &labelSpaceInfo, const IMarginalProbabilityCalibrationModel &marginalProbabilityCalibrationModel, const IJointProbabilityCalibrationModel &jointProbabilityCalibrationModel, uint32 numLabels) const override

Creates and returns a predictor that may be used to predict sparse binary labels for given query examples. If the prediction of sparse binary labels is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of sparse binary labels is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • ruleModel – A reference to an object of type IRuleModel that should be used to obtain predictions

  • labelSpaceInfo – A reference to an object of type ILabelSpaceInfo that provides information about the label space that may be used as a basis for obtaining predictions

  • marginalProbabilityCalibrationModel – A reference to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

  • jointProbabilityCalibrationModel – A reference to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type ISparseBinaryPredictor that may be used to predict sparse binary labels for the given query examples

virtual bool canPredictScores(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const override

Returns whether the rule learner is able to predict regression scores or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

True, if the rule learner is able to predict regression scores, false otherwise

virtual bool canPredictScores(const IRowWiseFeatureMatrix &featureMatrix, uint32 numLabels) const override

Returns whether the rule learner is able to predict regression scores or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • numLabels – The number of labels to predict for

Returns:

True, if the rule learner is able to predict regression scores, false otherwise

virtual std::unique_ptr<IScorePredictor> createScorePredictor(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const override

Creates and returns a predictor that may be used to predict regression scores for given query examples. If the prediction of regression scores is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of regression scores is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

An unique pointer to an object of type IScorePredictor that may be used to predict regression scores for the given query examples

virtual std::unique_ptr<IScorePredictor> createScorePredictor(const IRowWiseFeatureMatrix &featureMatrix, const IRuleModel &ruleModel, const ILabelSpaceInfo &labelSpaceInfo, uint32 numLabels) const override

Creates and returns a predictor that may be used to predict regression scores for given query examples. If the prediction of regression scores is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of regression scores is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • ruleModel – A reference to an object of type IRuleModel that should be used to obtain predictions

  • labelSpaceInfo – A reference to an object of type ILabelSpaceInfo that provides information about the label space that may be used as a basis for obtaining predictions

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type IScorePredictor that may be used to predict regression scores for the given query examples

virtual bool canPredictProbabilities(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const override

Returns whether the rule learner is able to predict probabilities or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

True, if the rule learner is able to predict probabilities, false otherwise

virtual bool canPredictProbabilities(const IRowWiseFeatureMatrix &featureMatrix, uint32 numLabels) const override

Returns whether the rule learner is able to predict probabilities or not.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • numLabels – The number of labels to predict for

Returns:

True, if the rule learner is able to predict probabilities, false otherwise

virtual std::unique_ptr<IProbabilityPredictor> createProbabilityPredictor(const IRowWiseFeatureMatrix &featureMatrix, const ITrainingResult &trainingResult) const override

Creates and returns a predictor that may be used to predict probability estimates for given query examples. If the prediction of probability estimates is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of probability estimates is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • trainingResult – A reference to an object of type ITrainingResult that provides access to the model and additional information that should be used to obtain predictions

Returns:

An unique pointer to an object of type IProbabilityPredictor that may be used to predict probability estimates for the given query examples

virtual std::unique_ptr<IProbabilityPredictor> createProbabilityPredictor(const IRowWiseFeatureMatrix &featureMatrix, const IRuleModel &ruleModel, const ILabelSpaceInfo &labelSpaceInfo, const IMarginalProbabilityCalibrationModel &marginalProbabilityCalibrationModel, const IJointProbabilityCalibrationModel &jointProbabilityCalibrationModel, uint32 numLabels) const override

Creates and returns a predictor that may be used to predict probability estimates for given query examples. If the prediction of probability estimates is not supported by the rule learner, a std::runtime_error is thrown.

Throws:

std::runtime_exception – The exception that is thrown if the prediction of probability estimates is not supported by the rule learner

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • ruleModel – A reference to an object of type IRuleModel that should be used to obtain predictions

  • labelSpaceInfo – A reference to an object of type ILabelSpaceInfo that provides information about the label space that may be used as a basis for obtaining predictions

  • marginalProbabilityCalibrationModel – A reference to an object of type IMarginalProbabilityCalibrationModel that may be used for the calibration of marginal probabilities

  • jointProbabilityCalibrationModel – A reference to an object of type IJointProbabilityCalibrationModel that may be used for the calibration of joint probabilities

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type IProbabilityPredictor that may be used to predict probability estimates for the given query examples

Protected Functions

virtual void createStoppingCriterionFactories(StoppingCriterionListFactory &factory) const

May be overridden by subclasses in order create objects of the type IStoppingCriterionFactory to be used by the rule learner.

Parameters:

factory – A reference to an object of type StoppingCriterionListFactory the objects may be added to

virtual void createPostOptimizationPhaseFactories(PostOptimizationPhaseListFactory &factory) const

May be overridden by subclasses in order to create objects of the type IPostOptimizationPhaseFactory to be used by the rule learner.

Parameters:

factory – A reference to an object of type PostOptimizationPhaseListFactory the objects may be added to

virtual std::unique_ptr<IStatisticsProviderFactory> createStatisticsProviderFactory(const IFeatureMatrix &featureMatrix, const IRowWiseLabelMatrix &labelMatrix) const = 0

Must be implemented by subclasses in order to create the IStatisticsProviderFactory to be used by the rule learner.

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 IRowWiseLabelMatrix that provides row-wise access to the labels of the training examples

Returns:

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

virtual std::unique_ptr<IModelBuilderFactory> createModelBuilderFactory() const = 0

Must be implemented by subclasses in order to create the IModelBuilderFactory to be used by the rule learner.

Returns:

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

virtual std::unique_ptr<ILabelSpaceInfo> createLabelSpaceInfo(const IRowWiseLabelMatrix &labelMatrix) const

May be overridden by subclasses in order to create the ILabelSpaceInfo to be used by the rule learner as a basis for for making predictions.

Parameters:

labelMatrix – A reference to an object of type IRowWiseLabelMatrix that provides row-wise access to the labels of the training examples

Returns:

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

virtual std::unique_ptr<IBinaryPredictorFactory> createBinaryPredictorFactory(const IRowWiseFeatureMatrix &featureMatrix, uint32 numLabels) const

May be overridden by subclasses in order to create the IBinaryPredictorFactory to be used by the rule learner for predicting binary labels.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type IBinaryPredictorFactory that has been created or a null pointer, if the rule learner does not support to predict binary labels

virtual std::unique_ptr<ISparseBinaryPredictorFactory> createSparseBinaryPredictorFactory(const IRowWiseFeatureMatrix &featureMatrix, uint32 numLabels) const

May be overridden by subclasses in order to create the ISparseBinaryPredictorFactory to be used by the rule learner for predicting sparse binary labels.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type ISparseBinaryPredictorFactory that has been created or a null pointer, if the rule learner does not support to predict sparse binary labels

virtual std::unique_ptr<IScorePredictorFactory> createScorePredictorFactory(const IRowWiseFeatureMatrix &featureMatrix, uint32 numLabels) const

May be overridden by subclasses in order to create the IScorePredictorFactory to be used by the rule learner for predicting regression scores.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type IScorePredictorFactory that has been created or a null pointer, if the rule learner does not support to predict regression scores

virtual std::unique_ptr<IProbabilityPredictorFactory> createProbabilityPredictorFactory(const IRowWiseFeatureMatrix &featureMatrix, uint32 numLabels) const

May be overridden by subclasses in order to create the IProbabilityPredictorFactory to be used by the rule learner for predicting probability estimates.

Parameters:
  • featureMatrix – A reference to an object of type IRowWiseFeatureMatrix that provides row-wise access to the feature values of the query examples

  • numLabels – The number of labels to predict for

Returns:

An unique pointer to an object of type IProbabilityPredictorFactory that has been created or a null pointer, if the rule learner does not support to predict probability estimates

Private Functions

std::unique_ptr<IRuleModelAssemblageFactory> createRuleModelAssemblageFactory(const IRowWiseLabelMatrix &labelMatrix) const
std::unique_ptr<IFeatureSpaceFactory> createFeatureSpaceFactory(const IFeatureMatrix &featureMatrix, const ILabelMatrix &labelMatrix) const
std::unique_ptr<IRuleInductionFactory> createRuleInductionFactory(const IFeatureMatrix &featureMatrix, const ILabelMatrix &labelMatrix) const
std::unique_ptr<ILabelSamplingFactory> createLabelSamplingFactory(const ILabelMatrix &labelMatrix) const
std::unique_ptr<IInstanceSamplingFactory> createInstanceSamplingFactory() const
std::unique_ptr<IFeatureSamplingFactory> createFeatureSamplingFactory(const IFeatureMatrix &featureMatrix) const
std::unique_ptr<IPartitionSamplingFactory> createPartitionSamplingFactory() const
std::unique_ptr<IRulePruningFactory> createRulePruningFactory() const
std::unique_ptr<IPostProcessorFactory> createPostProcessorFactory() const
std::unique_ptr<IStoppingCriterionFactory> createSizeStoppingCriterionFactory() const
std::unique_ptr<IStoppingCriterionFactory> createTimeStoppingCriterionFactory() const
std::unique_ptr<IStoppingCriterionFactory> createGlobalPruningFactory() const
std::unique_ptr<IPostOptimizationPhaseFactory> createSequentialPostOptimizationFactory() const
std::unique_ptr<IPostOptimizationPhaseFactory> createUnusedRuleRemovalFactory() const
std::unique_ptr<IMarginalProbabilityCalibratorFactory> createMarginalProbabilityCalibratorFactory() const
std::unique_ptr<IJointProbabilityCalibratorFactory> createJointProbabilityCalibratorFactory() const

Private Members

IRuleLearner::IConfig &config_
class Config : public virtual IRuleLearner::IConfig
#include <learner.hpp>

Allows to configure a rule learner.

Public Functions

explicit Config(RuleCompareFunction ruleCompareFunction)
Parameters:

ruleCompareFunction – An object of type RuleCompareFunction that defines the function that should be used for comparing the quality of different rules

Protected Attributes

std::unique_ptr<IDefaultRuleConfig> defaultRuleConfigPtr_

An unique pointer that stores the configuration of the default rule that is included in a rule-based model.

std::unique_ptr<IRuleModelAssemblageConfig> ruleModelAssemblageConfigPtr_

An unique pointer that stores the configuration of the method for the induction of several rules that are added to a rule-based model.

std::unique_ptr<IRuleInductionConfig> ruleInductionConfigPtr_

An unique pointer that stores the configuration of the algorithm for the induction of individual rules.

std::unique_ptr<IFeatureBinningConfig> featureBinningConfigPtr_

An unique pointer that stores the configuration of the method for the assignment of numerical feature values to bins

std::unique_ptr<ILabelSamplingConfig> labelSamplingConfigPtr_

An unique pointer that stores the configuration of the method for sampling labels.

std::unique_ptr<IInstanceSamplingConfig> instanceSamplingConfigPtr_

An unique pointer that stores the configuration of the method for sampling instances.

std::unique_ptr<IFeatureSamplingConfig> featureSamplingConfigPtr_

An unique pointer that stores the configuration of the method for sampling features.

std::unique_ptr<IPartitionSamplingConfig> partitionSamplingConfigPtr_

An unique pointer that stores the configuration of the method for partitioning the available training examples into a training set and a holdout set.

std::unique_ptr<IRulePruningConfig> rulePruningConfigPtr_

An unique pointer that stores the configuration of the method for pruning individual rules.

std::unique_ptr<IPostProcessorConfig> postProcessorConfigPtr_

An unique pointer that stores the configuration of the method for post-processing the predictions of rules once they have been learned.

std::unique_ptr<IMultiThreadingConfig> parallelRuleRefinementConfigPtr_

An unique pointer that stores the configuration of the multi-threading behavior that is used for the parallel refinement of rules.

std::unique_ptr<IMultiThreadingConfig> parallelStatisticUpdateConfigPtr_

An unique pointer that stores the configuration of the multi-threading behavior that is used for the parallel update of statistics.

std::unique_ptr<IMultiThreadingConfig> parallelPredictionConfigPtr_

An unique pointer that stores the configuration of the multi-threading behavior that is used to predict for several query examples in parallel.

std::unique_ptr<SizeStoppingCriterionConfig> sizeStoppingCriterionConfigPtr_

An unique pointer that stores the configuration of the stopping criterion that ensures that the number of rules does not exceed a certain maximum.

std::unique_ptr<TimeStoppingCriterionConfig> timeStoppingCriterionConfigPtr_

An unique pointer that stores the configuration of the stopping criterion that ensures that a certain time limit is not exceeded.

std::unique_ptr<IGlobalPruningConfig> globalPruningConfigPtr_

An unique pointer that stores the configuration of the stopping criterion that allows to decide how many rules should be included in a model, such that its performance is optimized globally.

std::unique_ptr<SequentialPostOptimizationConfig> sequentialPostOptimizationConfigPtr_

An unique pointer that stores the configuration of the post-optimization method that optimizes each rule in a model by relearning it in the context of the other rules.

std::unique_ptr<UnusedRuleRemovalConfig> unusedRuleRemovalConfigPtr_

An unique pointer that stores the configuration of the post-optimization method that removes unused rules from a model.

std::unique_ptr<IMarginalProbabilityCalibratorConfig> marginalProbabilityCalibratorConfigPtr_

An unique pointer that stores the configuration of the calibrator that allows to fit a model for the calibration of marginal probabilities.

std::unique_ptr<IJointProbabilityCalibratorConfig> jointProbabilityCalibratorConfigPtr_

An unique pointer that stores the configuration of the calibrator that allows to fit a model for the calibration of joint probabilities.

std::unique_ptr<IBinaryPredictorConfig> binaryPredictorConfigPtr_

An unique pointer that stores the configuration of the predictor that allows to predict binary labels.

std::unique_ptr<IScorePredictorConfig> scorePredictorConfigPtr_

An unique pointer that stores the configuration of the predictor that allows to predict regression scores.

std::unique_ptr<IProbabilityPredictorConfig> probabilityPredictorConfigPtr_

An unique pointer that stores the configuration of the predictor that allows to predict probability estimates.

Private Functions

virtual RuleCompareFunction getRuleCompareFunction() const final override

Returns the definition of the function that should be used for comparing the quality of different rules.

Returns:

An object of type RuleCompareFunction that defines the function that should be used for comparing the quality of different rules

virtual std::unique_ptr<IDefaultRuleConfig> &getDefaultRuleConfigPtr() final override

Returns an unique pointer to the configuration of the default that is included in a rule-based model.

Returns:

A reference to an unique pointer of type IDefaultRuleConfig that stores the configuration of the default rule that is included in a rule-based model

virtual std::unique_ptr<IRuleModelAssemblageConfig> &getRuleModelAssemblageConfigPtr() final override

Returns an unique pointer to the configuration of the algorithm for the induction of several rules that are added to a rule-based model.

Returns:

A reference to an unique pointer of type IRuleModelAssemblageConfig that stores the configuration of the algorithm for the induction of several rules that are added to a rule-based model

virtual std::unique_ptr<IRuleInductionConfig> &getRuleInductionConfigPtr() final override

Returns an unique pointer to the configuration of the algorithm for the induction of individual rules.

Returns:

A reference to an unique pointer of type IRuleInductionConfig that stores the configuration of the algorithm for the induction of individual rules

virtual std::unique_ptr<IFeatureBinningConfig> &getFeatureBinningConfigPtr() final override

Returns an unique pointer to the configuration of the method for the assignment of numerical feature values to bins.

Returns:

A reference to an unique pointer of type IFeatureBinningConfig that stores the configuration of the method for the assignment of numerical feature values to bins

virtual std::unique_ptr<ILabelSamplingConfig> &getLabelSamplingConfigPtr() final override

Returns an unique pointer to the configuration of the method for sampling labels.

Returns:

A reference to an unique pointer of type ILabelSamplingConfig that stores the configuration of the method for sampling labels

virtual std::unique_ptr<IInstanceSamplingConfig> &getInstanceSamplingConfigPtr() final override

Returns an unique pointer to the configuration of the method for sampling instances.

Returns:

A reference to an unique pointer of type IInstanceSamplingConfig that stores the configuration of the method for sampling instances

virtual std::unique_ptr<IFeatureSamplingConfig> &getFeatureSamplingConfigPtr() final override

Returns an unique pointer to the configuration of the method for sampling features.

Returns:

A reference to an unique pointer of type IFeatureSamplingConfig that specifies the configuration of the method for sampling features

virtual std::unique_ptr<IPartitionSamplingConfig> &getPartitionSamplingConfigPtr() final override

Returns an unique pointer to the configuration of the method for partitioning the available training examples into a training set and a holdout set.

Returns:

A reference to an unique pointer of type IPartitionSamplingConfig that stores the configuration of the method for partitioning the available training examples into a training set and a holdout set

virtual std::unique_ptr<IRulePruningConfig> &getRulePruningConfigPtr() final override

Returns an unique pointer to the configuration of the method for pruning individual rules.

Returns:

A reference to an unique pointer of type IRulePruningConfig that stores the configuration of the method for pruning individual rules

virtual std::unique_ptr<IPostProcessorConfig> &getPostProcessorConfigPtr() final override

Returns an unique pointer to the configuration of the method for post-processing the predictions of rules once they have been learned.

Returns:

A reference to an unique pointer of type IPostProcessorConfig that stores the configuration of the method that post-processes the predictions of rules once they have been learned

virtual std::unique_ptr<IMultiThreadingConfig> &getParallelRuleRefinementConfigPtr() final override

Returns an unique pointer to the configuration of the multi-threading behavior that is used for the parallel refinement of rules.

Returns:

A reference to an unique pointer of type IMultiThreadingConfig that stores the configuration of the multi-threading behavior that is used for the parallel refinement of rules

virtual std::unique_ptr<IMultiThreadingConfig> &getParallelStatisticUpdateConfigPtr() final override

Returns an unique pointer to the the configuration of the multi-threading behavior that is used for the parallel update of statistics.

Returns:

A reference to an unique pointer of type IMultiThreadingConfig that stores the configuration of the multi-threading behavior that is used for the parallel update of statistics

virtual std::unique_ptr<IMultiThreadingConfig> &getParallelPredictionConfigPtr() final override

Returns an unique pointer to the configuration of the multi-threading behavior that is used to predict for several query examples in parallel.

Returns:

A reference to an unique pointer of type IMultiThreadingConfig that stores the configuration of the multi-threading behavior that is used to predict for several query examples in parallel

virtual std::unique_ptr<SizeStoppingCriterionConfig> &getSizeStoppingCriterionConfigPtr() final override

Returns an unique pointer to the configuration of the stopping criterion that ensures that the number of rules does not exceed a certain maximum.

Returns:

A reference to an unique pointer of type SizeStoppingCriterionConfig that stores the configuration of the stopping criterion that ensures that the number of rules does not exceed a certain maximum or a null pointer, if no such stopping criterion should be used

virtual std::unique_ptr<TimeStoppingCriterionConfig> &getTimeStoppingCriterionConfigPtr() final override

Returns an unique pointer to the configuration of the stopping criterion that ensures that a certain time limit is not exceeded.

Returns:

A reference to an unique pointer of type TimeStoppingCriterionConfig that stores the configuration of the stopping criterion that ensures that a certain time limit is not exceeded or a null pointer, if no such stopping criterion should be used

virtual std::unique_ptr<IGlobalPruningConfig> &getGlobalPruningConfigPtr() final override

Returns an unique pointer to the configuration of the stopping criterion that allows to decide how many rules should be included in a model, such that its performance is optimized globally.

Returns:

A reference to an unique pointer of type IGlobalPruningConfig that stores the configuration of the stopping criterion that allows to decide how many rules should be included in a model, such that its performance is optimized globally, or a null pointer, if no such stopping criterion should be used

virtual std::unique_ptr<SequentialPostOptimizationConfig> &getSequentialPostOptimizationConfigPtr() final override

Returns an unique pointer to the configuration of the post-optimization method that optimizes each rule in a model by relearning it in the context of the other rules.

Returns:

A reference to an unique pointer of type SequentialPostOptimizationConfig that stores the configuration of the post-optimization method that optimizes each rule in a model by relearning it in the context of the other rules or a null pointer, if no such post-optimization method should be used

virtual std::unique_ptr<UnusedRuleRemovalConfig> &getUnusedRuleRemovalConfigPtr() final override

Returns an unique pointer to the configuration of the post-optimization method that removes unused rules from a model.

Returns:

A reference to an unique pointer of type UnusedRuleRemovalConfig that stores the configuration of the post-optimization method that removes unused rules from a model or a null pointer, if no such post-optimization method should be used

virtual std::unique_ptr<IMarginalProbabilityCalibratorConfig> &getMarginalProbabilityCalibratorConfigPtr() final override

Returns an unique pointer to the configuration of the calibrator that allows to fit a model for the calibration of marginal probabilities.

Returns:

A reference to an unique pointer of type IMarginalProbabilityCalibratorConfig that stores the configuration of the calibrator that allows to fit a model for the calibration of marginal probabilities

virtual std::unique_ptr<IJointProbabilityCalibratorConfig> &getJointProbabilityCalibratorConfigPtr() final override

Returns an unique pointer to the configuration of the calibrator that allows to fit a model for the calibration of joint probabilities.

Returns:

A reference to an unique pointer of type IJointProbabilityCalibratorConfig that stores the configuration of the calibrator that allows to fit a model for the calibration of joint probabilities

virtual std::unique_ptr<IBinaryPredictorConfig> &getBinaryPredictorConfigPtr() final override

Returns an unique pointer to the configuration of the predictor that allows to predict binary labels.

Returns:

A reference to an unique pointer of type IBinaryPredictorConfig that stores the configuration of the predictor that allows to predict binary labels or a null pointer if the prediction of binary labels is not supported

virtual std::unique_ptr<IScorePredictorConfig> &getScorePredictorConfigPtr() final override

Returns an unique pointer to the configuration of the predictor that allows to predict regression scores.

Returns:

A reference to an unique pointer of type IScorePredictorConfig that stores the configuration of the predictor that allows to predict regression scores or a null pointer, if the prediction of regression scores is not supported

virtual std::unique_ptr<IProbabilityPredictorConfig> &getProbabilityPredictorConfigPtr() final override

Returns an unique pointer to the configuration of the predictor that allows to predict probability estimates.

Returns:

A reference to an unique pointer of type IProbabilityPredictorConfig that stores the configuration of the predictor that allows to predict probability estimates or a null pointer, if the prediction of probability estimates is not supported

Private Members

const RuleCompareFunction ruleCompareFunction_