base.metrics.error_metric module¶
-
class
base.metrics.error_metric.ErrorMetric(default_value, max_value, step)¶ Bases:
abc.ABCAbstract Base Class for an error metric. Inheriting classes must implement methods:
__init__ getValueStr getNextValue getPrevValue greaterMaxParameters: - default_value – The default error value of the new ErrorMetric.
- max_value – The maximum error value of the new ErrorMetric.
- step – The step size, i.e. the rate at which the error value is increased.
Note
All value parameters can have arbitrary types to allow for arbitrary error definitions.
-
static
metricId()¶ Returns this ErrorMetric’s unique ID string.
-
id¶
-
default_value¶
-
max_value¶
-
step¶
-
getValueStr(value)¶ Returns a human-readable string representation of the given value.
-
getNextValues(cur_value)¶ Returns a list of all possible values resulting from increasing cur_value by one step.
-
getPrevValues(cur_value)¶ Returns a list of all possible values from which cur_value can be reached in one step. The list is empty if this is not possible.
-
greaterMax(value)¶ Returns
Trueif value exceeds max_value, elseFalse.
-
convertToValue(value)¶ Converts the given string representation of a value into the correct value type.