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.

abstract 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.

abstract 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 the sum of the weights of the uncovered labels is smaller or equal to a certain threshold.

abstract use_coverage_stopping_criterion() CoverageStoppingCriterionConfig

Configures the rule learner to use a stopping criterion that stops the induction of rules as soon as the sum of the weights of the uncovered labels is smaller or equal to a certain threshold.

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.

abstract 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.

abstract 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.

abstract 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.LabelWiseBinaryPredictionMixin

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.

abstract use_label_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.LaplaceHeuristicMixin

Bases: ABC

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

abstract 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.

abstract 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.

abstract 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.

abstract 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.NoCoverageStoppingCriterionMixin

Bases: ABC

Allows to configure a rule learner to not use any stopping criterion that stops the induction of rules as soon as the sum of the weights of the uncovered labels is smaller or equal to a certain threshold.

abstract use_no_coverage_stopping_criterion()

Configures the rule learner to not use any stopping criterion that stops the induction of rules as soon as the sum of the weights of the uncovered labels is smaller or equal to a certain threshold.

class mlrl.seco.cython.learner.NoLiftFunctionMixin

Bases: ABC

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

abstract use_no_lift_function()

Configures the rule learner to not use a lift function.

class mlrl.seco.cython.learner.PartialHeadMixin

Bases: ABC

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

abstract 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.

abstract 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.

abstract 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.

abstract 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.

abstract 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.

abstract use_recall_pruning_heuristic()

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

class mlrl.seco.cython.learner.SingleLabelHeadMixin

Bases: ABC

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

abstract use_single_label_heads()

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

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.

abstract 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.

abstract use_wra_pruning_heuristic()

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