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

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 *

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: timeseriesmetrics-0.1.9.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for timeseriesmetrics-0.1.9.tar.gz
Algorithm Hash digest
SHA256 ae2b7ebaabf27c559c58eae6f721991aec2af9b5a6645ee7615125479fd7d6cd
MD5 55904fc0904fcffda74f83b5924858d3
BLAKE2b-256 942287cd766053a9c54c7942ed31ea2261388bac6ffed5cbbe0916000c8c20be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for timeseriesmetrics-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b2fbfec37fb1388f327a6bbddb72f73586ae55af286f7fef0828eeeeab736e0b
MD5 00a505dbabf9b648fb18597be34b769b
BLAKE2b-256 75ad1750c7bff779f028fe4a90ad32cfb4a34082fde888dbf9c7d44de48f58c2

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