mlrl.testbed.prediction_scope module¶
Author: Michael Rapp (michael.rapp.ml@gmail.com)
Provides classes that provide information about predictions.
- class mlrl.testbed.prediction_scope.GlobalPrediction¶
Bases:
PredictionScopeProvides information about predictions that have been obtained from a global model.
- get_file_name(name: str) str¶
Returns a file name that corresponds to a specific prediction scope.
- Parameters:
name – The name of the file (without suffix)
- Returns:
The file name
- class mlrl.testbed.prediction_scope.IncrementalPrediction(model_size: int)¶
Bases:
PredictionScopeProvides information about predictions that have been obtained incrementally.
- get_file_name(name: str) str¶
Returns a file name that corresponds to a specific prediction scope.
- Parameters:
name – The name of the file (without suffix)
- Returns:
The file name
- class mlrl.testbed.prediction_scope.PredictionScope¶
Bases:
ABCProvides information about whether predictions have been obtained from a global model or incrementally.
- abstractmethod get_file_name(name: str) str¶
Returns a file name that corresponds to a specific prediction scope.
- Parameters:
name – The name of the file (without suffix)
- Returns:
The file name
- class mlrl.testbed.prediction_scope.PredictionType(*values)¶
Bases:
EnumContains all possible types of predictions that may be obtained from a learner.
- BINARY = 'binary'¶
- PROBABILITIES = 'probabilities'¶
- SCORES = 'scores'¶
- static parse(parameter_name: str, value: str) PredictionType¶
Parses and returns a parameter value that specifies the PredictionType of the prediction to be obtained from a learner. If the given value is invalid, a ValueError is raised.
- Parameters:
parameter_name – The name of the parameter
value – The value to be parsed
- Returns:
A PredictionType