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.8.tar.gz (3.7 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.8-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: timeseriesmetrics-0.1.8.tar.gz
  • Upload date:
  • Size: 3.7 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.8.tar.gz
Algorithm Hash digest
SHA256 df60196b13e881d063210b2a88514b348f9fc9d4c2495c646f887b38e81ea5eb
MD5 e568936391980144b38b5f96fad2241c
BLAKE2b-256 eb5f2ab7a0908c44cca648aee6b1c0e9124ceb2d6053315f5812e80577b535e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for timeseriesmetrics-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5fe7d3245f17eba5fc17bdcd803c30cc961cf083765d0c1bf261696ad7f07bf4
MD5 4b79bffd4a77b05a23fbf06dac4cd136
BLAKE2b-256 e30125e92de6cdd91174c43abb07a108979e7b2ba21ed8ba4f720ee6a0f315b6

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