Skip to main content

This package provides a comprehensive set of metrics designed to evaluate the performance of predictive models for time series. It includes commonly used metrics such as MAPE, Theil's U, ARV, ID (Index of Disagreement), and WPOCID.

Project description

Time Series Metrics

Follow the official repository: GitHub

PyPI Downloads

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

Installation

You can install the package using pip:

pip install timeseriesmetrics

Usage

The 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.

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.2.1.tar.gz (3.9 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.2.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: timeseriesmetrics-0.2.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for timeseriesmetrics-0.2.1.tar.gz
Algorithm Hash digest
SHA256 cb10b45025e4be4901f7206614af3aaae9a835948d0c5f73c135238ff5189d57
MD5 c5f654dc45c59fb70161dcae15bab428
BLAKE2b-256 b94c2ecc9795bc58b45003fcfba704092ee4835f5e80b6328643bfa713674f83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for timeseriesmetrics-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 999a01f6c85506e01b4ffd52318238deb534d393bffc42b1ce30e33e1eac8c83
MD5 ebce0a9053359cf4450c0eaece824af9
BLAKE2b-256 5699b65d0862305e270c0f21c6ab0b09fde882561b47f2113c1e499fe05ae8e2

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