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.6.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.6-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: timeseriesmetrics-0.1.6.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.6.tar.gz
Algorithm Hash digest
SHA256 ff34a6a6b6787c663ea427ce3bd7fbb23f1aaaff2fdb688cec6466460895f297
MD5 9235b2b179015ac8b009f4cdf5581ac3
BLAKE2b-256 230a2e4fe2336b2fbd8e239f80df64ba6f9a33408b3033a0e5c1e38890edbf47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for timeseriesmetrics-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e7ad993f0995143062db68b449bce9de9ded2635783fe4302d6101f685425033
MD5 1a84b43e1565e72a4e1ce4f421cde495
BLAKE2b-256 6c89ef6fed2e043675bbbc97e50918e907fce3ad2b5b605fe62a70babdfb8234

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