mlrl.seco.cython.learner module

@author: Michael Rapp (michael.rapp.ml@gmail.com)

class mlrl.seco.cython.learner.AccuracyHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “Accuracy” heuristic for learning rules.

abstractmethod use_accuracy_heuristic()

Configures the rule learner to use the “Accuracy” heuristic for learning rules.

class mlrl.seco.cython.learner.AccuracyPruningHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “Accuracy” heuristic for pruning rules.

abstractmethod use_accuracy_pruning_heuristic()

Configures the rule learner to use the “Accuracy” heuristic for pruning rules.

class mlrl.seco.cython.learner.CoverageStoppingCriterionMixin

Bases: ABC

Allows to configure a rule learner to use a stopping criterion that stops the induction of rules as soon as a certain fraction of the available training examples and labels is covered.

abstractmethod use_coverage_stopping_criterion() CoverageStoppingCriterionConfig

Configures the rule learner to use a stopping criterion that stops the induction of rules as soon as a certain fraction of the available training examples and labels is covered.

Returns:

A CoverageStoppingCriterionConfig that allows further configuration of the stopping criterion

class mlrl.seco.cython.learner.FMeasureHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “F-Measure” heuristic for learning rules.

abstractmethod use_f_measure_heuristic() FMeasureConfig

Configures the rule learner to use the “F-Measure” heuristic for learning rules.

Returns:

A FMeasureConfig that allows further configuration of the heuristic

class mlrl.seco.cython.learner.FMeasurePruningHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “F-Measure” heuristic for pruning rules.

abstractmethod use_f_measure_pruning_heuristic() FMeasureConfig

Configures the rule learner to use the “F-Measure” heuristic for pruning rules.

Returns:

A FMeasureConfig that allows further configuration of the heuristic

class mlrl.seco.cython.learner.KlnLiftFunctionMixin

Bases: ABC

Allows to configure a rule learner to use a lift function that monotonously increases according to the natural logarithm of the number of labels for which a rule predicts.

abstractmethod use_kln_lift_function() KlnLiftFunctionConfig

Configures the rule learner to use a lift function that monotonously increases according to the natural logarithm of the number of labels for which a rule predicts.

Returns:

A KlnLiftFunctionConfig that allows further configuration of the lift function

class mlrl.seco.cython.learner.LaplaceHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “Laplace” heuristic for learning rules.

abstractmethod use_laplace_heuristic()

Configures the rule learner to use the “Laplace” heuristic for learning rules.

class mlrl.seco.cython.learner.LaplacePruningHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “Laplace” heuristic for pruning rules.

abstractmethod use_laplace_pruning_heuristic()

Configures the rule learner to use the “Laplace” heuristic for pruning rules.

class mlrl.seco.cython.learner.MEstimateHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “M-Estimate” heuristic for learning rules.

abstractmethod use_m_estimate_heuristic() MEstimateConfig

Configures the rule learner to use the “M-Estimate” heuristic for learning rules.

Returns:

A MEstimateConfig that allows further configuration of the heuristic

class mlrl.seco.cython.learner.MEstimatePruningHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “M-Estimate” heuristic for pruning rules.

abstractmethod use_m_estimate_pruning_heuristic() MEstimateConfig

Configures the rule learner to use the “M-Estimate” heuristic for pruning rules.

Returns:

A MEstimateConfig that allows further configuration of the heuristic

class mlrl.seco.cython.learner.NoLiftFunctionMixin

Bases: ABC

Allows to configure a rule learner to not use a lift function.

abstractmethod use_no_lift_function()

Configures the rule learner to not use a lift function.

class mlrl.seco.cython.learner.OutputWiseBinaryPredictionMixin

Bases: ABC

Allows to configure a rule learner to use a predictor for predicting whether individual labels of given query examples are relevant or irrelevant by processing rules of an existing rule-based model in the order they have been learned. If a rule covers an example, its prediction is applied to each label individually.

abstractmethod use_output_wise_binary_predictor()

Configures the rule learner to use predictor for predicting whether individual labels of given query examples are relevant or irrelevant by processing rules of an existing rule-based model in the order they have been learned. If a rule covers an example, its prediction is applied to each label individually.

class mlrl.seco.cython.learner.PartialHeadMixin

Bases: ABC

Allows to configure a rule learner to induce rules with partial heads.

abstractmethod use_partial_heads()

Configures the rule learner to induce rules with partial heads that predict for a subset of the available labels.

class mlrl.seco.cython.learner.PeakLiftFunctionMixin

Bases: ABC

Allows to configure a rule learner to use a lift function that monotonously increases until a certain number of labels, where the maximum lift is reached, and monotonously decreases afterwards.

abstractmethod use_peak_lift_function() PeakLiftFunctionConfig

Configures the rule learner to use a lift function that monotonously increases until a certain number of labels, where the maximum lift is reached, and monotonously decreases afterwards.

Returns:

A PeakLiftFunctionConfig that allows further configuration of the lift function

class mlrl.seco.cython.learner.PrecisionHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “Precision” heuristic for learning rules.

abstractmethod use_precision_heuristic()

Configures the rule learner to use the “Precision” heuristic for learning rules.

class mlrl.seco.cython.learner.PrecisionPruningHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “Precision” heuristic for pruning rules.

abstractmethod use_precision_pruning_heuristic()

Configures the rule learner to use the “Precision” heuristic for pruning rules.

class mlrl.seco.cython.learner.RecallHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “Recall” heuristic for pruning rules.

abstractmethod use_recall_heuristic()

Configures the rule learner to use the “Recall” heuristic for learning rules.

class mlrl.seco.cython.learner.RecallPruningHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “Recall” heuristic for pruning rules.

abstractmethod use_recall_pruning_heuristic()

Configures the rule learner to use the “Recall” heuristic for pruning rules.

class mlrl.seco.cython.learner.SingleOutputHeadMixin

Bases: ABC

Allows to configure a rule learner to induce rules with single-output heads that predict for a single output.

abstractmethod use_single_output_heads()

Configures the rule learner to induce rules with single-output heads that predict for a single output.

class mlrl.seco.cython.learner.WraHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “Weighted Relative Accuracy” (WRA) heuristic for learning rules.

abstractmethod use_wra_heuristic()

Configures the rule learner to use the “Weighted Relative Accuracy” heuristic for learning rules.

class mlrl.seco.cython.learner.WraPruningHeuristicMixin

Bases: ABC

Allows to configure a rule learner to use the “Weighted Relative Accuracy” (WRA) heuristic for pruning rules.

abstractmethod use_wra_pruning_heuristic()

Configures the rule learner to use the “Weighted Relative Accuracy” heuristic for pruning rules.