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

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.0.tar.gz (3.8 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.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: timeseriesmetrics-0.2.0.tar.gz
  • Upload date:
  • Size: 3.8 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.0.tar.gz
Algorithm Hash digest
SHA256 4fc36d1c65f8ea5ba727f28cad1845f671a86ae577b67b5485d41cb86f89813a
MD5 c75240b951647663b7b43872d4ebd006
BLAKE2b-256 af33e5d0c41e967666ef49b8351b9f764537fbcbaa128e61b32d9137bd2def44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for timeseriesmetrics-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6252a65f1383680ade10b52f46303cdfdd44959137476b812ed4a22bcb94bef
MD5 8656f03d74d4d05b55471d3f4627df2f
BLAKE2b-256 319bcae1b3ba0133fcdf06919589652a3953b86a844a412bd41387aa4e5c95f2

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