Some utilities to perform Extreme Value Analysis
Project description
Welcome to xtremes!
xtremes is a Python library designed for extreme value analysis, with tools for simulating time series, extracting block maxima, and performing advanced statistical operations, such as bootstrapping estimators for extreme value distributions. It was created as part of the ClimXtreme project and aims to provide supplementary code and simulations for related work.
Key Features:
- Simulates time series for extreme value distributions (GEV, Frechet, etc.).
- Extracts Disjoint and Sliding Block Maxima.
- Extracts Disjoint and Sliding Block High Order Statistics.
- Provides robust bootstrapping tools for extreme value statistics.
- Supports advanced MLE and PWM estimation for extreme value distributions.
Submodules:
- topt: Contains functions and classes to compute block maxima, high-order statistics, and perform extreme value analysis.
- bootstrap: Provides methods for bootstrapping block maxima and sliding block maxima, with support for both Disjoint and Sliding Block Maxima methods.
Installation:
(.venv) $ pip install xtremes
You can also view the package on PyPi at https://pypi.org/project/xtremes/.
Getting Started:
-
Install the package via pip:
(.venv) $ pip install xtremes
-
Import the necessary submodules and start exploring extreme value statistics:
import xtremes.topt as topt import xtremes.bootstrap as bst
-
For more detailed documentation, check out https://xtremes.readthedocs.io/en/latest/.
Example Usage:
Here's a simple example to get started with xtremes:
import xtremes.topt as topt
import xtremes.bootstrap as bst
# Simulate time series data
ts = topt.TimeSeries(n=100, distr='GEV', correlation='IID', modelparams=[0.5])
ts.simulate(rep=10)
# Extract block maxima
ts.get_blockmaxima(block_size=5)
# Perform bootstrap analysis
bootstrap = bst.FullBootstrap(ts.values, block_size=5)
bootstrap.run_bootstrap(num_bootstraps=100)
print(bootstrap.statistics['mean'])
Documentation:
Further documentation can be found at https://xtremes.readthedocs.io/en/latest/.
Example Output:
The following plot shows block maxima extracted from a simulated time series:
Foundational insights behind the methods used in xtremes.bootstrap have been developed by [[BS24]].
Roadmap:
- Add support for additional time series models (ARIMA).
- Improve documentation with more examples.
- Optimize bootstrapping methods for large datasets.
Note:
This project is under active development throughout the project phase and will provide additional code to support theoretical advancements in extreme value statistics. (todo: add DOI (badge))
References:
[BS24]: Bücher, A., & Staud, T. (2024). Bootstrapping Estimators based on the Block Maxima Method. arXiv preprint arXiv:2409.05529.
Suggested Citation:
If you use the bootstrapping functionality or methods related to block maxima in this library, please cite the following paper:
@article{tba,
title={tba,
author={B{"u}cher, Axel and Haufs, Erik},
journal={tba},
year={tba}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xtremes-0.3.2.2.tar.gz.
File metadata
- Download URL: xtremes-0.3.2.2.tar.gz
- Upload date:
- Size: 6.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cdf64f309cadb36e7c906ce1534c08b43c71459871d63bdec75a4184f32984c
|
|
| MD5 |
2fbc0cdf91a1920292295fb80343f20f
|
|
| BLAKE2b-256 |
6679736a6f301c0371c331c3a948fca3b955ca9582be23f65751dedff2e216f1
|
File details
Details for the file xtremes-0.3.2.2-py3-none-any.whl.
File metadata
- Download URL: xtremes-0.3.2.2-py3-none-any.whl
- Upload date:
- Size: 40.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
893917c04288d418eb0d370a2781d72bd94958913e51da66408ac95fb59b4443
|
|
| MD5 |
5796193ed101ea0c44109de3853ecd55
|
|
| BLAKE2b-256 |
3ae7b3076353ecc7847f2aa63ca74003cfd0070cd4ffd448c5a3009e316d03b0
|