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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for timeseriesmetrics-0.2.2.tar.gz
Algorithm Hash digest
SHA256 c46e44d2772cfc30977cbe74503ac332e858ce397707a8afb0c0b40d43fe536f
MD5 9f3117f35f2515c8dfc979d4cc82caaf
BLAKE2b-256 80d04c81b3e456987bf4dd4e6aac110563e1aaa579d7f05ce360754bceb25cb7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for timeseriesmetrics-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 48f67b68e1b3313ea5ba9dda42c067e4f1576f526dda76ece8e51f0061421975
MD5 2bd6c43e4d31fa9df7725c1f3e22d43c
BLAKE2b-256 38a7a840821cedb2af07ab99dd18763768de99ef87193042c2e752aabd34743f

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