Median Absolute Percentage Error

class pycast.errors.medianabsolutepercentageerror.MedianAbsolutePercentageError(minimalErrorCalculationPercentage=60)[source]

Bases: pycast.errors.meanabsolutepercentageerror.MeanAbsolutePercentageError

Represents the median absolute percentage error.

_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

Previous topic

Geometric Mean Absolute Percentage Error

Next topic

Symmetric Mean Absolute Percentage Error

This Page