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

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.0.tar.gz (3.5 MB view hashes)

Uploaded Source

Built Distribution

pyextremes-2.0.0-py3-none-any.whl (49.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page