Mean Absolute Deviation

class pycast.errors.meanabsolutedeviationerror.MeanAbsoluteDeviationError(minimalErrorCalculationPercentage=60)[source]

Bases: pycast.errors.baseerrormeasure.BaseErrorMeasure

Implements the mean absolute deviation error measure.

_calculate(startingPercentage, endPercentage, startDate, endDate)[source]

This is the error calculation function that gets called by BaseErrorMeasure.get_error().

Both parameters will be correct at this time.

Parameters:
  • startingPercentage (float) – Defines the start of the interval. This has to be a value in [0.0, 100.0]. It represents the value, where the error calculation should be started. 25.0 for example means that the first 25% of all calculated errors will be ignored.
  • endPercentage (float) – Defines the end of the interval. This has to be a value in [0.0, 100.0]. It represents the value, after which all error values will be ignored. 90.0 for example means that the last 10% of all local errors will be ignored.
  • startDate (float) – Epoch representing the start date used for error calculation.
  • endDate (float) – Epoch representing the end date used in the error calculation.
Returns:

Returns a float representing the error.

Return type:

float

local_error(originalValue, calculatedValue)[source]

Calculates the error between the two given values.

Parameters:
  • originalValue (list) – List containing the values of the original data.
  • calculatedValue (list) – List containing the values of the calculated TimeSeries that corresponds to originalValue.
Returns:

Returns the error measure of the two given values.

Return type:

numeric

Previous topic

Mean Squared Error

Next topic

Mean Absolute Percentage Error

This Page