Skip to main content

This package is a set of metrics commonly used to analyze the performance of predictive models for time series, such as MAPE, Theil's U, ARV, ID (Index of Disagreement), WPOCID.

Project description

Timeseries Metrics

This package provides several metrics used to evaluate the performance of predictive models in time series.

GitHub Link.

Installation

You can install the package using pip:

pip install timeseriesmetrics

Usage

The package can be used as follows:

from timeseriesmetrics import *

y_true = [1, 2, 3, 4, 5]
y_pred = [3, 4, 3, 4, 5]

theil(y_true, y_pred)

Where y_true represents the real values ​​and y_pred the predicted values.

Definitions

  • $ N $: number of observations.
  • $ u_{t} $: real values.
  • $ \widehat{u}_{t} $: predicted values.
  • $ \overline{u}_{t} $: mean of the real values.

Available Metrics

MAPE

MAPE (Mean Absolute Percentage Error) measures the accuracy of the model, presenting a relative value:

ARV

ARV (Average Relative Variance) compares the predictor's performance with the simple average of past values ​​in the series:

ID

ID (Index of Disagreement) disregards the unit of measurement, presenting values ​​in the interval [0, 1]:

Theil'U

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

WPOCID measures how well the model predicts the trend of the target time series:

References

More details on the metrics discussed can be found in the article A non-central beta model to forecast and evaluate pandemics time series.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timeseriesmetrics-0.1.4.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timeseriesmetrics-0.1.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file timeseriesmetrics-0.1.4.tar.gz.

File metadata

  • Download URL: timeseriesmetrics-0.1.4.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for timeseriesmetrics-0.1.4.tar.gz
Algorithm Hash digest
SHA256 fb0db1876945198aa81d4ec4d597b31ec4403074ca4306e1558f949b6334ffcd
MD5 57fca82dc0f9d06001fce630dd971606
BLAKE2b-256 d1a086c6155f20f2d383f44dc4ad9d804184b82aad5353961c93d35ebc9d9d71

See more details on using hashes here.

File details

Details for the file timeseriesmetrics-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for timeseriesmetrics-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6b97854766a63327b8e9335b1d9035283e57dd4cbc95134cd6dcbac5090abccd
MD5 2671b5fb48eb172c85a3f36f35edd9a9
BLAKE2b-256 cd34f3d601d255b457edec19e339cb2cf43d0e80be4b47b1b7bac67f3695dd90

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page