All Projects → JuliaEarth → ExtremeStats.jl

JuliaEarth / ExtremeStats.jl

Licence: MIT license
Extreme value statistics in Julia

Programming Languages

julia
2034 projects

Projects that are alternatives of or similar to ExtremeStats.jl

pyextremes
Extreme Value Analysis (EVA) in Python
Stars: ✭ 89 (+242.31%)
Mutual labels:  extremes
WordMat
WordMat is an add-in to MicroSoft Word enabling math functionality
Stars: ✭ 25 (-3.85%)
Mutual labels:  maxima
Gaalop
Gaalop (Geometic Algebra Algorithms Optimizer) is a software to compile and optimize geometric algebra (GA) expressions into high-level programming language code. Geometric algebra expressions can be developed using the freely available CLUCalc software by Christian Perwass. Gaalop optimizes CLUCalc expressions and produces C++ (AMP), OpenCL, CU…
Stars: ✭ 55 (+111.54%)
Mutual labels:  maxima
Maxima.jl
Symbolic Computations in Julia using Maxima
Stars: ✭ 42 (+61.54%)
Mutual labels:  maxima
clj-maxima
Maxima as a clojure library
Stars: ✭ 28 (+7.69%)
Mutual labels:  maxima


This package provides a set of tools for analysing and estimating extreme value distributions. It defines two types, BlockMaxima and PeakOverThreshold, which can be used to filter a collection of values into a collection of maxima.

Given a collection of maxima produced by either model above, one can start estimating heavy-tail distributions and plotting classical extreme value statistics.

Installation

Get the latest stable release with Julia's package manager:

] add ExtremeStats

Usage

Given a collection of values xs (e.g. time series), one can retrieve its maxima:

using ExtremeStats

# find maxima with blocks of size 50
bm = BlockMaxima(xs, 50)

# get values above a threshold of 100.
pm = PeakOverThreshold(xs, 100.)

For the block maxima model, the values xs need to represent a measurement over time, whereas the peak over threshold model does not assume any ordering in the data. Both models are lazy, and the maxima are only returned via a collect call.

Plotting

A few plot recipes are defined for maxima as well as for the original values xs:

using Plots

# mean excess plot
excessplot(xs)

# Pareto quantile plot
paretoplot(xs)

# return level plot
returnplot(xs)

Fitting

Generalized extreme value (GEV) and generalized Pareto (GP) distributions from the Distributions.jl package can be fit to maxima via constrained optimization (maximum likelihood + extreme value index constraints):

using Distributions

# fit GEV to block maxima
fit(GeneralizedExtremeValue, bm)

# fit GP to peak over threshold
fit(GeneralizedPareto, pm)

Statistics

A few statistics are defined:

# return statistics
returnlevels(xs)

# mean excess with previous k values
meanexcess(xs, k)

References

The book An Introduction to Statistical Modeling of Extreme Values by Stuart Coles gives a practical introduction to the theory. Most other books I've encountered are too theoretical or expose topics that are somewhat disconnected.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].