Skip to main content

Extreme Value Analysis (EVA) in Python

Project description

build status coverage status pypi package conda version

About

Version: 2.0.0

License: MIT

E-Mail: bocharovgeorgii@gmail.com

Documentation: see the Tutorials section

pyextremes is a Python library implementing an easy-to-use extensible framework used to perform Extreme Value Analysis (EVA). It provides tools necessary to perform typical tasks constituting EVA, such as:

  • extraction of extreme events from time series using Block Maxima or Peaks Over Threshold methods

  • fitting continuous distributions, such as GEV, GPD, or user specified continous distribution, to the extracted extreme events

  • visualization of model performance and goodness-of-fit statistics

  • estimation of extreme events of given probability (e.g. 100-year event) and corresponding confidence intervals

  • tools assisting with model selection and tuning (block size in BM, threshold in POT)

  • (work-in-progress) multivariate extreme value analysis

Framework provided by the pyextremes library is easy to use and requires minimum user input to get good results. Its default parameters are configured in compliance with best industry standards (many concepts are based on the “An Introduction to Statistical Modeling of Extreme Values” book by Stuard Coles).

The framework also supports more in-depth configuration for specific cases. It supports all scipy continous distributions and also custom user-made distributions, which are subclasses of scipy.stats.rv_continuous. Any parameter of a distribution may be frozen to investigate degenerate models (e.g. GEV->Gumbel). Distributions are fitted to the data using one of the following models:

  • MLE (default model) - Maximum Likelihood Estimate, uses scipy

  • Emcee - Markov Chain Monte Calro, uses emcee

Installation

Available via pip:

pip install pyextremes

Via anaconda:

conda install -c conda-forge pyextremes

Or from GitHub directly:

pip install git+https://github.com/georgebv/pyextremes

Dependencies

Python version: 3.7 or later

Required packages:

  • emcee >= 3.0

  • matplotlib

  • numpy

  • pandas

  • scipy

Tutorials

  • Basic usage

  • Fitting models

  • Statistical distributions

  • Block maxima

    • Selecting block size

  • Peaks over threshold

  • Extreme high and extreme low values

Illustrations

Model diagnostic

model diagnostic image

Extreme value extraction

extremes image

Model fitting (MCMC)

Trace plot

trace image

Corner plot

corner image

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

pyextremes-2.0.1.tar.gz (3.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyextremes-2.0.1-py3-none-any.whl (50.4 kB view details)

Uploaded Python 3

File details

Details for the file pyextremes-2.0.1.tar.gz.

File metadata

  • Download URL: pyextremes-2.0.1.tar.gz
  • Upload date:
  • Size: 3.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for pyextremes-2.0.1.tar.gz
Algorithm Hash digest
SHA256 77f0e615c721fe680db7c059d152e8f0fe5fa3214e7e8451aec54e6586d3034d
MD5 49335b158cf9f2ec5e14f7ef21e791bf
BLAKE2b-256 e5c5e270a05258b5b314fac06d7e96c85fa507bfc1b324d1c46428accc3f089a

See more details on using hashes here.

File details

Details for the file pyextremes-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pyextremes-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 50.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for pyextremes-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17baaf238d2818185c583060db1df4d7000f2942c8d289d8c47637d2249f4fdf
MD5 b32ae99165b57fc8b79b1ba603e39daf
BLAKE2b-256 42753345daab398a452b5ee49a4612d08084c52d67e843b561b7abfb111d8bfb

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