mlrl.common.testbed.runnables module¶
Author: Michael Rapp (michael.rapp.ml@gmail.com)
Provides base classes for programs that can be configured via command line arguments.
- class mlrl.common.testbed.runnables.RuleLearnerRunnable(classifier_type: Type | None, classifier_config_type: Type | None, classifier_parameters: Set[Parameter] | None, regressor_type: Type | None, regressor_config_type: Type | None, regressor_parameters: Set[Parameter] | None)¶
Bases:
SkLearnRunnableA base class for all programs that perform an experiment that involves training and evaluation of a rule learner.
- class IncrementalPredictionExtension(*dependencies: Extension)¶
Bases:
ExtensionAn extension that configures the functionality to obtain incremental predictions.
- INCREMENTAL_EVALUATION = <mlrl.util.cli.BoolArgument object>¶
- static get_predictor_factory(args: Namespace, prediction_type: PredictionType) PredictorFactory¶
Returns the SkLearnProblem.PredictorFactory that should be used for obtaining predictions of a specific type from a previously trained model according to the configuration.
- Parameters:
args – The command line arguments specified by the user
prediction_type – The type of the predictions
- Returns:
The SkLearnProblem.PredictorFactory that should be used
- class IncrementalPredictorFactory(prediction_type: PredictionType, min_size: int, max_size: int, step_size: int)¶
Bases:
GlobalPredictorFactoryAllow to create instances of type Predictor that obtain incremental predictions from a model repeatedly.
- class RuleLearnerExtension(*dependencies: Extension)¶
Bases:
ExtensionAn extension that configures the algorithmic parameters of a rule learner.
- FEATURE_FORMAT = <mlrl.util.cli.EnumArgument object>¶
- OUTPUT_FORMAT = <mlrl.util.cli.EnumArgument object>¶
- PREDICTION_FORMAT = <mlrl.util.cli.EnumArgument object>¶
- SPARSE_FEATURE_VALUE = <mlrl.util.cli.FloatArgument object>¶
- static get_estimator(args: Namespace, estimator_type: Type, parameters: Set[Parameter] | None) Any¶
Returns the scikit-learn estimator to be used in an experiment.
- Parameters:
args – The command line arguments specified by the user
estimator_type – The type of the estimator
parameters – The algorithmic parameters of the estimator
- create_classifier(args: Namespace) ClassifierMixin | None¶
See
mlrl.testbed.runnables.Runnable.create_classifier()
- create_predictor_factory(args, prediction_type: PredictionType) PredictorFactory¶
See
mlrl.testbed_sklearn.runnables.SkLearnRunnable.create_predictor_factory()
- create_regressor(args: Namespace) RegressorMixin | None¶
See
mlrl.testbed_sklearn.runnables.SkLearnRunnable.create_regressor()
- get_algorithmic_arguments(known_args: Namespace) Set[Argument]¶
See
mlrl.testbed.runnables.Runnable.get_algorithmic_arguments()