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
IRuleModelthat 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
IRuleModelthat 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
ILabelSpaceInfothat 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
ILabelSpaceInfothat 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
IMarginalProbabilityCalibrationModelthat 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
IMarginalProbabilityCalibrationModelthat 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
IJointProbabilityCalibrationModelthat 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
IJointProbabilityCalibrationModelthat may be used for the calibration of joint probabilities
-
inline virtual ~ITrainingResult()¶
-
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
IFeatureInfothat provides information about the types of individual featuresfeatureMatrix – A reference to an object of type
IColumnWiseFeatureMatrixthat provides column-wise access to the feature values of the training exampleslabelMatrix – A reference to an object of type
IRowWiseLabelMatrixthat provides row-wise access to the ground truth labels of the training examplesrandomState – The seed to be used by random number generators
- Returns:
An unique pointer to an object of type
ITrainingResultthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesnumLabels – 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat provides access to the model and additional information that should be used to obtain predictions
- Returns:
An unique pointer to an object of type
IBinaryPredictorthat 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesruleModel – A reference to an object of type
IRuleModelthat should be used to obtain predictionslabelSpaceInfo – A reference to an object of type
ILabelSpaceInfothat provides information about the label space that may be used as a basis for obtaining predictionsmarginalProbabilityCalibrationModel – A reference to an object of type
IMarginalProbabilityCalibrationModelthat may be used for the calibration of marginal probabilitiesjointProbabilityCalibrationModel – A reference to an object of type
IJointProbabilityCalibrationModelthat may be used for the calibration of joint probabilitiesnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
IBinaryPredictorthat 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat provides access to the model and additional information that should be used to obtain predictions
- Returns:
An unique pointer to an object of type
ISparseBinaryPredictorthat 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesruleModel – A reference to an object of type
IRuleModelthat should be used to obtain predictionslabelSpaceInfo – A reference to an object of type
ILabelSpaceInfothat provides information about the label space that may be used as a basis for obtaining predictionsmarginalProbabilityCalibrationModel – A reference to an object of type
IMarginalProbabilityCalibrationModelthat may be used for the calibration of marginal probabilitiesjointProbabilityCalibrationModel – A reference to an object of type
IJointProbabilityCalibrationModelthat may be used for the calibration of joint probabilitiesnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
ISparseBinaryPredictorthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesnumLabels – 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat provides access to the model and additional information that should be used to obtain predictions
- Returns:
An unique pointer to an object of type
IScorePredictorthat 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesruleModel – A reference to an object of type
IRuleModelthat should be used to obtain predictionslabelSpaceInfo – A reference to an object of type
ILabelSpaceInfothat provides information about the label space that may be used as a basis for obtaining predictionsnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
IScorePredictorthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesnumLabels – 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat provides access to the model and additional information that should be used to obtain predictions
- Returns:
An unique pointer to an object of type
IProbabilityPredictorthat 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesruleModel – A reference to an object of type
IRuleModelthat should be used to obtain predictionslabelSpaceInfo – A reference to an object of type
ILabelSpaceInfothat provides information about the label space that may be used as a basis for obtaining predictionsmarginalProbabilityCalibrationModel – A reference to an object of type
IMarginalProbabilityCalibrationModelthat may be used for the calibration of marginal probabilitiesjointProbabilityCalibrationModel – A reference to an object of type
IJointProbabilityCalibrationModelthat may be used for the calibration of joint probabilitiesnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
IProbabilityPredictorthat 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
IBeamSearchTopDownRuleInductionthat allows further configuration of the algorithm for the induction of individual rules
-
inline virtual ~IBeamSearchTopDownRuleInductionMixin() override¶
-
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
RuleCompareFunctionthat 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
IDefaultRuleConfigthat 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
IRuleModelAssemblageConfigthat 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
IRuleInductionConfigthat 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
IFeatureBinningConfigthat 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
ILabelSamplingConfigthat 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
IInstanceSamplingConfigthat 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
IFeatureSamplingConfigthat 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
IPartitionSamplingConfigthat 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
IRulePruningConfigthat 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
IPostProcessorConfigthat 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
IMultiThreadingConfigthat 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
IMultiThreadingConfigthat 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
IMultiThreadingConfigthat 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
SizeStoppingCriterionConfigthat 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
TimeStoppingCriterionConfigthat 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
IGlobalPruningConfigthat 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
SequentialPostOptimizationConfigthat 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
UnusedRuleRemovalConfigthat 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
IMarginalProbabilityCalibratorConfigthat 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
IJointProbabilityCalibratorConfigthat 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
IBinaryPredictorConfigthat 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
IScorePredictorConfigthat 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
IProbabilityPredictorConfigthat 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
-
inline virtual ~IConfig()¶
-
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.
-
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
IEqualFrequencyFeatureBinningConfigthat allows further configuration of the method for the assignment of numerical feature values to bins
-
inline virtual ~IEqualFrequencyFeatureBinningMixin() override¶
-
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
IEqualWidthFeatureBinningConfigthat allows further configuration of the method for the assignment of numerical feature values to bins
-
inline virtual ~IEqualWidthFeatureBinningMixin() override¶
-
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
IExampleWiseStratifiedBiPartitionSamplingConfigthat allows further configuration of the method for partitioning the available training examples into a training and a holdout set
-
inline virtual ~IExampleWiseStratifiedBiPartitionSamplingMixin() override¶
-
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
IExampleWiseStratifiedInstanceSamplingConfigthat allows further configuration of the method for sampling instances
-
inline virtual ~IExampleWiseStratifiedInstanceSamplingMixin() override¶
-
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
IFeatureSamplingWithoutReplacementConfigthat allows further configuration of the method for sampling features
-
inline virtual ~IFeatureSamplingWithoutReplacementMixin() override¶
-
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
IGreedyTopDownRuleInductionConfigthat allows further configuration of the algorithm for the induction of individual rules
-
inline virtual ~IGreedyTopDownRuleInductionMixin() override¶
-
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
IInstanceSamplingWithoutReplacementConfigthat allows further configuration of the method for sampling instances
-
inline virtual ~IInstanceSamplingWithoutReplacementMixin() override¶
-
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
IInstanceSamplingWithReplacementConfigthat allows further configuration of the method for sampling instances
-
inline virtual ~IInstanceSamplingWithReplacementMixin() override¶
-
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).
-
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
ILabelSamplingWithoutReplacementConfigthat allows further configuration of the method for sampling labels
-
inline virtual ~ILabelSamplingWithoutReplacementMixin() override¶
-
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
ILabelWiseStratifiedBiPartitionSamplingConfigthat allows further configuration of the method for partitioning the available training examples into a training and a holdout set
-
inline virtual ~ILabelWiseStratifiedBiPartitionSamplingMixin() override¶
-
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
ILabelWiseStratifiedInstanceSamplingConfigthat allows further configuration of the method for sampling instances
-
inline virtual ~ILabelWiseStratifiedInstanceSamplingMixin() override¶
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
IManualMultiThreadingConfigthat allows further configuration of the multi-threading behavior
-
inline virtual ~IParallelPredictionMixin() override¶
-
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
IManualMultiThreadingConfigthat allows further configuration of the multi-threading behavior
-
inline virtual ~IParallelRuleRefinementMixin() override¶
-
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
IManualMultiThreadingConfigthat allows further configuration of the multi-threading behavior
-
inline virtual ~IParallelStatisticUpdateMixin() override¶
-
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.
-
inline virtual ~IPostPruningMixin() override¶
-
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
IPrePruningConfigthat allows further configuration of the stopping criterion
-
inline virtual ~IPrePruningMixin() override¶
-
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
IRandomBiPartitionSamplingConfigthat allows further configuration of the method for partitioning the available training examples into a training set and a holdout set
-
inline virtual ~IRandomBiPartitionSamplingMixin() override¶
-
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.
-
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
ISequentialPostOptimizationConfigthat allows further configuration of the post-optimization method
-
inline virtual ~ISequentialPostOptimizationMixin() override¶
-
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.
-
inline virtual ~ISequentialRuleModelAssemblageMixin() override¶
-
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
ISizeStoppingCriterionConfigthat allows further configuration of the stopping criterion
-
inline virtual ~ISizeStoppingCriterionMixin() override¶
-
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
ITimeStoppingCriterionConfigthat allows further configuration of the stopping criterion
-
inline virtual ~ITimeStoppingCriterionMixin() override¶
-
inline virtual ~IRuleLearner()¶
-
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::IConfigthat 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
IFeatureInfothat provides information about the types of individual featuresfeatureMatrix – A reference to an object of type
IColumnWiseFeatureMatrixthat provides column-wise access to the feature values of the training exampleslabelMatrix – A reference to an object of type
IRowWiseLabelMatrixthat provides row-wise access to the ground truth labels of the training examplesrandomState – The seed to be used by random number generators
- Returns:
An unique pointer to an object of type
ITrainingResultthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesnumLabels – 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat provides access to the model and additional information that should be used to obtain predictions
- Returns:
An unique pointer to an object of type
IBinaryPredictorthat 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesruleModel – A reference to an object of type
IRuleModelthat should be used to obtain predictionslabelSpaceInfo – A reference to an object of type
ILabelSpaceInfothat provides information about the label space that may be used as a basis for obtaining predictionsmarginalProbabilityCalibrationModel – A reference to an object of type
IMarginalProbabilityCalibrationModelthat may be used for the calibration of marginal probabilitiesjointProbabilityCalibrationModel – A reference to an object of type
IJointProbabilityCalibrationModelthat may be used for the calibration of joint probabilitiesnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
IBinaryPredictorthat 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat provides access to the model and additional information that should be used to obtain predictions
- Returns:
An unique pointer to an object of type
ISparseBinaryPredictorthat 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesruleModel – A reference to an object of type
IRuleModelthat should be used to obtain predictionslabelSpaceInfo – A reference to an object of type
ILabelSpaceInfothat provides information about the label space that may be used as a basis for obtaining predictionsmarginalProbabilityCalibrationModel – A reference to an object of type
IMarginalProbabilityCalibrationModelthat may be used for the calibration of marginal probabilitiesjointProbabilityCalibrationModel – A reference to an object of type
IJointProbabilityCalibrationModelthat may be used for the calibration of joint probabilitiesnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
ISparseBinaryPredictorthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesnumLabels – 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat provides access to the model and additional information that should be used to obtain predictions
- Returns:
An unique pointer to an object of type
IScorePredictorthat 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesruleModel – A reference to an object of type
IRuleModelthat should be used to obtain predictionslabelSpaceInfo – A reference to an object of type
ILabelSpaceInfothat provides information about the label space that may be used as a basis for obtaining predictionsnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
IScorePredictorthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesnumLabels – 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplestrainingResult – A reference to an object of type
ITrainingResultthat provides access to the model and additional information that should be used to obtain predictions
- Returns:
An unique pointer to an object of type
IProbabilityPredictorthat 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_erroris 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
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesruleModel – A reference to an object of type
IRuleModelthat should be used to obtain predictionslabelSpaceInfo – A reference to an object of type
ILabelSpaceInfothat provides information about the label space that may be used as a basis for obtaining predictionsmarginalProbabilityCalibrationModel – A reference to an object of type
IMarginalProbabilityCalibrationModelthat may be used for the calibration of marginal probabilitiesjointProbabilityCalibrationModel – A reference to an object of type
IJointProbabilityCalibrationModelthat may be used for the calibration of joint probabilitiesnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
IProbabilityPredictorthat 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
IStoppingCriterionFactoryto be used by the rule learner.- Parameters:
factory – A reference to an object of type
StoppingCriterionListFactorythe objects may be added to
-
virtual void createPostOptimizationPhaseFactories(PostOptimizationPhaseListFactory &factory) const¶
May be overridden by subclasses in order to create objects of the type
IPostOptimizationPhaseFactoryto be used by the rule learner.- Parameters:
factory – A reference to an object of type
PostOptimizationPhaseListFactorythe 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
IStatisticsProviderFactoryto be used by the rule learner.- Parameters:
featureMatrix – A reference to an object of type
IFeatureMatrixthat provides access to the feature values of the training exampleslabelMatrix – A reference to an object of type
IRowWiseLabelMatrixthat provides row-wise access to the labels of the training examples
- Returns:
An unique pointer to an object of type
IStatisticsProviderFactorythat has been created
-
virtual std::unique_ptr<IModelBuilderFactory> createModelBuilderFactory() const = 0¶
Must be implemented by subclasses in order to create the
IModelBuilderFactoryto be used by the rule learner.- Returns:
An unique pointer to an object of type
IModelBuilderFactorythat has been created
-
virtual std::unique_ptr<ILabelSpaceInfo> createLabelSpaceInfo(const IRowWiseLabelMatrix &labelMatrix) const¶
May be overridden by subclasses in order to create the
ILabelSpaceInfoto be used by the rule learner as a basis for for making predictions.- Parameters:
labelMatrix – A reference to an object of type
IRowWiseLabelMatrixthat provides row-wise access to the labels of the training examples- Returns:
An unique pointer to an object of type
ILabelSpaceInfothat 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
IBinaryPredictorFactoryto be used by the rule learner for predicting binary labels.- Parameters:
featureMatrix – A reference to an object of type
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
IBinaryPredictorFactorythat 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
ISparseBinaryPredictorFactoryto be used by the rule learner for predicting sparse binary labels.- Parameters:
featureMatrix – A reference to an object of type
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
ISparseBinaryPredictorFactorythat 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
IScorePredictorFactoryto be used by the rule learner for predicting regression scores.- Parameters:
featureMatrix – A reference to an object of type
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
IScorePredictorFactorythat 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
IProbabilityPredictorFactoryto be used by the rule learner for predicting probability estimates.- Parameters:
featureMatrix – A reference to an object of type
IRowWiseFeatureMatrixthat provides row-wise access to the feature values of the query examplesnumLabels – The number of labels to predict for
- Returns:
An unique pointer to an object of type
IProbabilityPredictorFactorythat 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
RuleCompareFunctionthat 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
RuleCompareFunctionthat 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
IDefaultRuleConfigthat 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
IRuleModelAssemblageConfigthat 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
IRuleInductionConfigthat 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
IFeatureBinningConfigthat 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
ILabelSamplingConfigthat 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
IInstanceSamplingConfigthat 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
IFeatureSamplingConfigthat 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
IPartitionSamplingConfigthat 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
IRulePruningConfigthat 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
IPostProcessorConfigthat 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
IMultiThreadingConfigthat 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
IMultiThreadingConfigthat 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
IMultiThreadingConfigthat 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
SizeStoppingCriterionConfigthat 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
TimeStoppingCriterionConfigthat 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
IGlobalPruningConfigthat 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
SequentialPostOptimizationConfigthat 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
UnusedRuleRemovalConfigthat 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
IMarginalProbabilityCalibratorConfigthat 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
IJointProbabilityCalibratorConfigthat 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
IBinaryPredictorConfigthat 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
IScorePredictorConfigthat 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
IProbabilityPredictorConfigthat 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_¶
-
explicit Config(RuleCompareFunction ruleCompareFunction)¶
-
explicit AbstractRuleLearner(IRuleLearner::IConfig &config)¶