Follow the official repository:
This package provides several metrics used to evaluate the performance of predictive models in time series.
You can install the package using pip:
pip install timeseriesmetricsThe package can be used as follows:
from timeseriesmetrics import Metrics
y_true = [1, 2, 3, 4, 5]
y_pred = [3, 4, 3, 4, 5]
Metrics.theil(y_true, y_pred)Where y_true represents the real values and y_pred the predicted values.
- $ N $: number of observations.
- $ u_{t} $: real values.
- $ \widehat{u}_{t} $: predicted values.
- $ \overline{u}_{t} $: mean of the real values.
MAPE (Mean Absolute Percentage Error) measures the accuracy of the model, presenting a relative value:
ARV (Average Relative Variance) compares the predictor's performance with the simple average of past values in the series:
ID (Index of Disagreement) disregards the unit of measurement, presenting values in the interval [0, 1]:
Theil'U compares prediction performance to the Random Walk model (in which $ u_{t} $ is inferred by $ u_{t-1} $), where Theil< 1 indicates a better prediction than the Random Walk model:
WPOCID measures how well the model predicts the trend of the target time series:
More details on the metrics discussed can be found in the article A non-central beta model to forecast and evaluate pandemics time series.




