Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

API Overview

Surface Inventory

Layer 0 — Primitives (xtremax._src)

Pure JAX functions. Stateless, differentiable, no NumPyro dependency.

SubmoduleKey FunctionsDescription
_src.gevgev_log_prob, gev_cdf, gev_icdf, gev_return_level, gev_mean, gev_varianceGEV density, CDF, quantile, return level, moments
_src.gpdgpd_log_prob, gpd_cdf, gpd_survival, gpd_return_level, gpd_mean_excessGPD density, CDF, survival, return level, mean excess
_src.point_processpoisson_log_likelihood, inhomogeneous_poisson_log_likelihood, hawkes_log_likelihood, extremal_indexPoint process likelihoods and diagnostics
_src.max_stablebrown_resnick_extremal_coeff, smith_extremal_coeff, schlather_extremal_coeff, pairwise_log_likelihood, madogramMax-stable dependence functions and composite likelihood
_src.variogrampower_variogram, matern_variogramSemivariogram functions for spatial models

See: Layer 0 — Primitives

Layer 1 — Components

NumPyro Distribution subclasses (wrapping L0 functions), xarray utilities, plotting, simulations, datasets, GP wrappers.

Distributions (NumPyro wrappers around L0 math):

ClassWrapsDescription
GEVDgev_* functionsFull three-parameter GEV distribution
GPDgpd_* functionsGeneralized Pareto for threshold exceedances
Gumbelgev_* with ξ=0Light-tailed extreme value
Frechetgev_* with ξ>0Heavy-tailed extreme value
Weibullgev_* with ξ<0Bounded upper tail
HawkesProcesshawkes_log_likelihoodSelf-exciting point process
HomogeneousPoissonProcesspoisson_log_likelihoodConstant-rate events
BrownResnickProcesspairwise_log_likelihood + brown_resnick_extremal_coeffMax-stable spatial process
SmithProcess, SchlatherProcess, ExtremalTProcessRespective L0 functionsOther max-stable models

xarray utilities, plotting, simulations, datasets, GP:

ModuleKey ExportsDescription
xarray.block_maximatemporal_block_maxima, spatial_block_maxima, sliding_block_maxima, r_largest_block_maximaBlock maxima extraction
xarray.thresholdquantile_threshold, trend_quantile_threshold, parametric_quantile_thresholdThree-tier threshold selection
xarray.declusterdecluster_runs, decluster_separation, estimate_extremal_indexDeclustering utilities
xarray.masksland_sea_mask, coverage_mask, quality_mask, combine_masksSpatial/temporal/quality masking
plotting.*plot_qq, plot_return_level, plot_return_level_map, plot_posterior, ...Diagnostic, spatial, temporal, model plots
simulations.*generate_gmst_trajectory, create_domain, simulate_temp_extremes, ...Synthetic data generation
datasets.*ghcnd, gsod, ndbc, uhslc, gesla, coops, covariatesClimate/ocean observation loaders
gpVariationalGP, SparseVariationalGPGPJax integration wrappers

See: Components

Layer 2 — Models (xtremax.models)

ModuleKey ExportsDescription
models.stationary_gevstationary_geviid GEV block maxima model
models.nonstationary_gevnonstationary_gevGEV with covariate-dependent parameters
models.spatial_gevspatial_gevGEV + GPJax spatial pooling
models.pot_gpdpot_gpdPeaks-over-threshold with GPD
models.point_processpoint_process_extremePoint process extreme value models
models.max_stablemax_stable_compositeMax-stable process fitting (composite likelihood)

See: Models — Model Zoo

Conventions

Notation

SymbolMeaning
μ\mu (loc)Location parameter
σ\sigma (scale)Scale parameter (σ>0\sigma > 0)
ξ\xi (concentration/shape)Shape parameter (ξ>0\xi > 0: heavy tail, ξ=0\xi = 0: Gumbel, ξ<0\xi < 0: bounded)
zTz_TTT-year return level
θ\thetaExtremal index (0<θ≤10 < \theta \leq 1)
uuThreshold for POT analysis
λ\lambdaExceedance rate (expected exceedances per block)

Import Conventions

# Layer 0 — Pure JAX functions (no NumPyro)
from xtremax._src.gev import gev_log_prob, gev_cdf, gev_return_level
from xtremax._src.gpd import gpd_log_prob, gpd_survival, gpd_return_level
from xtremax._src.point_process import hawkes_log_likelihood
from xtremax._src.max_stable import brown_resnick_extremal_coeff, pairwise_log_likelihood

# Layer 1 — NumPyro distributions (wrap L0)
from xtremax.distributions import GEVD, GPD, Gumbel, Frechet, Weibull
from xtremax.distributions.point_process import HawkesProcess, HomogeneousPoissonProcess
from xtremax.distributions.max_stable import BrownResnickProcess

# Layer 1 — xarray utilities
from xtremax.xarray import block_maxima, threshold, decluster

# Layer 1 — datasets
from xtremax.datasets import ghcnd, ndbc
from xtremax.datasets.covariates import global_warming, enso

# Layer 2 — Models (NumPyro model functions)
from xtremax.models import stationary_gev, nonstationary_gev, spatial_gev, pot_gpd

# Inference (from NumPyro — not xtremax)
from numpyro.infer import MCMC, NUTS, SVI, Predictive

Detail Files

FileCovers
Layer 0 — PrimitivesLayer 0 — pure JAX functions (GEV, GPD, point process, max-stable, variogram)
ComponentsLayer 1 — NumPyro distributions, xarray utilities, plotting, simulations, datasets, GP, copulas
Models — Model ZooLayer 2 — model zoo (stationary, nonstationary, spatial GEV, POT, PP)

For usage patterns, see ../examples/ — organized by layer to match this directory.