Skip to main content

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.

Metadata

Release files for timeseriesmetrics 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for timeseriesmetrics 0.2.2
File Size Uploaded
timeseriesmetrics-0.2.2.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for timeseriesmetrics 0.2.2
File Interpreter ABI Platform
timeseriesmetrics-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / timeseriesmetrics-0.2.2.tar.gz

Download URL timeseriesmetrics-0.2.2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c46e44d2772cfc30977cbe74503ac332e858ce397707a8afb0c0b40d43fe536f
BLAKE2b-256 checksum
How to use checksums
80d04c81b3e456987bf4dd4e6aac110563e1aaa579d7f05ce360754bceb25cb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.22

Release files / timeseriesmetrics-0.2.2-py3-none-any.whl

Download URL timeseriesmetrics-0.2.2-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48f67b68e1b3313ea5ba9dda42c067e4f1576f526dda76ece8e51f0061421975
BLAKE2b-256 checksum
How to use checksums
38a7a840821cedb2af07ab99dd18763768de99ef87193042c2e752aabd34743f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.22

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.6

2 release files

0.1.4

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page