Skip to content

Capability index

Every public name in xtremax (202 of them), each listed once at its subpackage home and grouped by the module that defines it, with the first sentence of its docstring. import xtremax re-exports the five EVT distribution classes and every name in xtremax.primitives; the point-process wrappers in xtremax.point_processes.distributions share their names with the operators they wrap. Search this page before writing a helper: if what you need is here, compose it; if it is almost here, extend it where it lives. Regenerate with make capabilities after changing a public API (tests/test_capabilities.py checks it is current).

xtremax.distributions

Name Kind What it does
FrechetType2GEVD class Fréchet Type II Generalized Extreme Value Distribution for NumPyro.
GeneralizedExtremeValueDistribution class Generalized Extreme Value Distribution (GEVD) for NumPyro.
GeneralizedParetoDistribution class Generalized Pareto Distribution (GPD) for NumPyro.
GumbelType1GEVD class Gumbel Type I Generalized Extreme Value Distribution for NumPyro.
WeibullType3GEVD class Weibull Type III Generalized Extreme Value Distribution for NumPyro.

xtremax.primitives

Pure-JAX primitives for the Fréchet (Type II) extreme value distribution (xtremax.primitives.frechet)

Name Kind What it does
frechet_cdf function Fréchet CDF.
frechet_icdf function Fréchet quantile function.
frechet_log_prob function Fréchet log PDF (assumes shape > 0).
frechet_mean function Fréchet mean (+inf when shape >= 1).
frechet_return_level function T-period return level.

Pure-JAX primitives for the Generalized Extreme Value distribution (xtremax.primitives.gev)

Name Kind What it does
gev_cdf function CDF of the Generalized Extreme Value distribution.
gev_icdf function Quantile function (inverse CDF) of the GEV distribution.
gev_log_prob function Log PDF of the Generalized Extreme Value distribution.
gev_log_survival function Log survival function \(\log S(x) = \log(1 - F(x))\) of the GEV.
gev_mean function Mean of the GEV distribution (+inf when \(\xi \ge 1\)).
gev_return_level function T-period return level: \(z_T = F^{-1}(1 - 1/T)\).
gev_survival function Survival function \(S(x) = 1 - F(x)\) of the GEV distribution.

Pure-JAX primitives for the Generalized Pareto Distribution (xtremax.primitives.gpd)

Name Kind What it does
gpd_cdf function CDF of the Generalized Pareto Distribution.
gpd_icdf function Quantile function (inverse CDF) of the GPD.
gpd_log_prob function Log PDF of the Generalized Pareto Distribution (loc = 0).
gpd_log_survival function Log survival \(\log S(x) = -\tfrac{1}{\xi}\log(1 + \xi x/\sigma)\).
gpd_mean function GPD mean: \(\sigma / (1 - \xi)\) for \(\xi < 1\), else +inf.
gpd_return_level function T-period return level: \(Q(1 - 1/T)\).
gpd_survival function Survival function \(S(x) = (1 + \xi x/\sigma)^{-1/\xi}\) of the GPD.

Pure-JAX primitives for the Gumbel Type I distribution (xtremax.primitives.gumbel)

Name Kind What it does
gumbel_cdf function Gumbel CDF: \(F(x) = \exp(-\exp(-z))\).
gumbel_icdf function Gumbel quantile: \(Q(p) = \mu - \sigma\log(-\log p)\).
gumbel_log_prob function Gumbel log PDF: \(-\log\sigma - z - e^{-z}\), \(z=(x-\mu)/\sigma\).
gumbel_mean function Gumbel mean: \(\mu + \sigma\gamma_E\).
gumbel_return_level function T-period return level: \(Q(1 - 1/T)\).

Pure-JAX primitives for non-stationary GEV return levels (xtremax.primitives.nonstationary)

Name Kind What it does
assemble_nonstationary_gev_fields function Build non-stationary spatio-temporal GEV parameter fields.
expected_exceedances function Expected number of block exceedances of a threshold.
nonstationary_return_level function Return level for stationary or non-stationary GEV parameter fields.
nonstationary_return_period function Return period associated with a threshold under (non-)stationary GEV.

Pure-JAX spatial building blocks for hierarchical extreme value models (xtremax.primitives.spatial)

Name Kind What it does
design_matrix function Prepend an intercept column to a static-covariate matrix.
pairwise_distances function Euclidean distance matrix between sites.
two_range_correlation function Two-range exponential correlation matrix with unit diagonal.

Pure-JAX primitives for the reverse Weibull (Type III) extreme value distribution (xtremax.primitives.weibull)

Name Kind What it does
weibull_cdf function Reverse-Weibull CDF.
weibull_icdf function Reverse-Weibull quantile function.
weibull_log_prob function Reverse-Weibull log PDF (assumes shape < 0).
weibull_mean function Reverse-Weibull mean (always finite for shape < 0).
weibull_return_level function T-period return level.

xtremax.extraction

xtremax.extraction.block_maxima

Name Kind What it does
declustered_block_maxima function Extract declustered block maxima by identifying independent extreme events.
r_largest_block_maxima function Extract r-largest order statistics from each block.
sliding_block_maxima function Extract block maxima using a sliding window approach.
spatial_block_maxima function Extract spatial block maximum values from an xarray DataArray.
temporal_block_maxima function Extract temporal block maximum values from an xarray DataArray.

xtremax.extraction.decluster

Name Kind What it does
decluster_runs function Decluster exceedances using the runs method.
decluster_separation function Decluster by enforcing minimum separation between peaks.
estimate_extremal_index function Estimate the extremal index (theta), a measure of clustering.

Quantile regression utilities for extremes thresholding (xtremax.extraction.quantile_regression)

Name Kind What it does
XarrayQuantileRegressor class Quantile regressor that operates on xr.DataArray inputs.
quantile_regression_threshold function Estimate a time-varying threshold via linear quantile regression.

Threshold selection for peaks-over-threshold (POT) analysis (xtremax.extraction.threshold)

Name Kind What it does
constant_threshold function Return a constant threshold value.
quantile_threshold function Calculate threshold based on a percentile of the data.
rolling_threshold function Calculate time-varying threshold using a rolling window.
seasonal_threshold function Calculate seasonal threshold (backward compatibility wrapper).
temporal_threshold function Calculate time-varying threshold based on temporal grouping.

xtremax.point_processes

Ergonomic adapters wrapping plain values as retention / mark callables (xtremax.point_processes._adapters)

Name Kind What it does
constant_mark_distribution function Mark distribution that ignores time and history and returns d.
constant_retention function Retention that always returns the same probability p.
time_varying_marks function Wrap a time → Distribution callable into the full signature.
time_varying_retention function Wrap a pure function of time into the full retention signature.

Axis-aligned rectangular domain and temporal interval for point processes (xtremax.point_processes._domain)

Name Kind What it does
RectangularDomain class Axis-aligned rectangle [lo, hi] ⊂ ℝᵈ.
TemporalDomain class Half-open temporal interval [t0, t1) ⊂ ℝ.

Padded event-history PyTree shared by all TPP families (xtremax.point_processes._history)

Name Kind What it does
EventHistory class Fixed-size buffer of events + optional marks.

Numerical integration utilities for temporal point processes (xtremax.point_processes._integration)

Name Kind What it does
cumulative_log_intensity function Shorthand for \(\Lambda(t) = \int_0^t \lambda(s) ds\).
integrate_log_intensity function Compute \(\int_{t_0}^{t_1} \exp(\log\lambda(s))\, ds\).

Multi-dimensional integration helpers for spatial point processes (xtremax.point_processes._integration_spatial)

Name Kind What it does
integrate_log_intensity_spatial function Compute \(\int_D \exp(\log\lambda(s))\, ds\).

Quadrature over a space-time slab D × [t0, t1) (xtremax.point_processes._integration_spatiotemporal)

Name Kind What it does
integrate_log_intensity_spatiotemporal function Compute \(\int_{t_0}^{t_1} \int_D \exp(\log\lambda(s, t))\, ds\, dt\).

Shared result types for point-process samplers and diagnostics (xtremax.point_processes._results)

Name Kind What it does
GoodnessOfFit class Bundle of diagnostics returned by goodness_of_fit.
MarkedSampleResult class Marked temporal sample: (times, mask, marks).
MarkedSpatialSampleResult class Marked spatial sample: (locations, mask, marks).
MarkedSpatiotemporalSampleResult class Marked spatiotemporal sample: (locations, times, mask, marks).
SampleResult class Unmarked temporal sample: (times, mask, n_events).
SpatialSampleResult class Unmarked spatial sample: (locations, mask, n_events).
SpatiotemporalSampleResult class Unmarked spatiotemporal sample: (locations, times, mask, n_events).

xtremax.point_processes.primitives

Goodness-of-fit diagnostics for temporal point processes (xtremax.point_processes.primitives.diagnostics)

Name Kind What it does
compensator_curve function Pairs (t_i, Λ(t_i)) for a compensator plot.
ks_statistic_exp1 function Two-sided Kolmogorov–Smirnov statistic against Exp(1).
qq_exp1_quantiles function Theoretical vs empirical quantiles against Exp(1) for a QQ plot.
time_rescaling_residuals function Rescaled inter-event times under the compensator.

Analytical second-order summaries for spatial point processes (xtremax.point_processes.primitives.diagnostics_spatial)

Name Kind What it does
csr_l_function function Besag's L-function, the variance-stabilised K.
csr_pair_correlation function Pair correlation function under CSR: g(r) ≡ 1.
csr_ripleys_k function Theoretical Ripley's K-function under CSR, \(K(r) = V_d r^d\).
unit_ball_volume function Volume of the unit ℝᵈ ball: \(V_d = \pi^{d/2}/\Gamma(d/2+1)\).

Pure primitives for self-exciting (Hawkes) temporal point processes (xtremax.point_processes.primitives.hawkes)

Name Kind What it does
exp_hawkes_cumulative_intensity function Exponential-kernel Hawkes compensator.
exp_hawkes_intensity function Conditional intensity of the exponential-kernel Hawkes process.
exp_hawkes_lambda_max function Upper bound \(\mu + \alpha \cdot N(t)\) valid from the last event onward.
exp_hawkes_log_prob function Log-likelihood \(\sum_i \log \lambda^*(t_i) - \Lambda(T)\) for exp Hawkes.
exp_hawkes_sample function Ogata thinning sample of an exponential-kernel Hawkes process.
general_hawkes_cumulative_intensity function Compensator \(\mu T + \sum_i \int_{t_i}^{T} \phi(s - t_i) ds\).
general_hawkes_intensity function Conditional intensity for a general kernel.
general_hawkes_log_prob function Log-likelihood for a general-kernel Hawkes process.
general_hawkes_sample function Ogata thinning for a general-kernel Hawkes process.

Self-exciting spatiotemporal point process (ETAS-style Hawkes) (xtremax.point_processes.primitives.hawkes_spatiotemporal)

Name Kind What it does
stpp_hawkes_compensator function Closed-form compensator \(\Lambda\) of the ETAS Hawkes process.
stpp_hawkes_intensity function Conditional intensity \(\lambda^*(s, t)\) of the ETAS Hawkes process.
stpp_hawkes_lambda_max function Adaptive upper bound \(\bar\lambda = \mu + N \alpha \beta k_s(0)\).
stpp_hawkes_log_prob function Log-likelihood \(\sum_i \log \lambda^*(s_i, t_i) - \Lambda\).
stpp_hawkes_sample function Ogata-style spatiotemporal thinning sample.

Pure-JAX primitives for the Homogeneous Poisson Process on [0, T] (xtremax.point_processes.primitives.hpp)

Name Kind What it does
hpp_cumulative_intensity function Compensator \(\Lambda(t) = \lambda t\).
hpp_exceedance_log_prob function log P(N > k) over [start, end], computed via the Poisson CDF.
hpp_hazard function Constant hazard equal to rate.
hpp_intensity function Constant intensity \(\lambda(t) = \lambda\).
hpp_inter_event_log_prob function Log density of τ ~ Exp(λ): \(\log \lambda - \lambda \tau\).
hpp_log_prob function Log-likelihood \(\log L = n \log \lambda - \lambda T\).
hpp_mean_residual_life function Memorylessness gives \(\mathbb{E}[T - s \mid T > s] = 1/\lambda\).
hpp_predict_count function Expected event count on [start, end]: λ (end - start).
hpp_return_period function Time τ such that \(P(\text{no event in } \tau) = 1 - p\).
hpp_sample function Sample ordered event times from a homogeneous Poisson process.
hpp_survival function \(S(t\vert s) = \exp(-\lambda (t - s))\) for t >= s.

Pure-JAX primitives for the homogeneous spatial Poisson process (xtremax.point_processes.primitives.hpp_spatial)

Name Kind What it does
hpp_spatial_count_log_prob function Marginal Poisson-count log-pmf log P(N = n).
hpp_spatial_intensity function Constant intensity λ(s) = λ, broadcast against locations.
hpp_spatial_log_prob function Joint Janossy log-likelihood of a homogeneous Poisson pattern.
hpp_spatial_nearest_neighbor_distance function Expected nearest-neighbour distance for a CSR pattern in ℝᵈ.
hpp_spatial_predict_count function Mean and variance of the count in a sub-domain (both λ \|A\|).
hpp_spatial_sample function Sample a CSR realisation on a rectangular domain.

Pure-JAX primitives for the homogeneous spatiotemporal Poisson process (xtremax.point_processes.primitives.hpp_spatiotemporal)

Name Kind What it does
hpp_spatiotemporal_count_log_prob function Marginal Poisson-count log-pmf log P(N = n) with mean λ \|D\| T.
hpp_spatiotemporal_intensity function Constant intensity λ(s, t) = λ, broadcast against times.
hpp_spatiotemporal_log_prob function Janossy log-likelihood n log λ − λ \|D\| (t1 − t0).
hpp_spatiotemporal_predict_count function Mean and variance of the count in a sub-slab (both λ \|A\| τ).
hpp_spatiotemporal_sample function Sample a homogeneous spatiotemporal Poisson realisation.

Pure-JAX primitives for the Inhomogeneous Poisson Process on [0, T] (xtremax.point_processes.primitives.ipp)

Name Kind What it does
ipp_cumulative_hazard function \(\Lambda(t) - \Lambda(s)\) via quadrature.
ipp_cumulative_intensity function Compensator \(\Lambda(t)\) via composite trapezoid.
ipp_hazard function Hazard equals the intensity for an IPP.
ipp_intensity function Pointwise intensity λ(t) = exp(log_intensity_fn(t)).
ipp_inter_event_log_prob function Log density of the next-event delay τ given last event at s.
ipp_log_prob function Log-likelihood of an observed IPP event sequence.
ipp_predict_count function Expected count \(\Lambda(end) - \Lambda(start)\) on [start, end].
ipp_sample_inversion function Exact inversion sampling when \(\Lambda^{-1}\) is available.
ipp_sample_thinning function Sample via Lewis–Shedler thinning with a static buffer.
ipp_survival function \(S(t\vert s) = \exp(-[\Lambda(t) - \Lambda(s)])\) for t >= s.

Pure-JAX primitives for the inhomogeneous spatial Poisson process (xtremax.point_processes.primitives.ipp_spatial)

Name Kind What it does
ipp_spatial_intensity function Pointwise intensity λ(s) = exp(log_intensity_fn(s)).
ipp_spatial_log_prob function Log-likelihood of an observed inhomogeneous spatial pattern.
ipp_spatial_predict_count function Expected count over a sub-domain A.
ipp_spatial_sample_thinning function Lewis–Shedler thinning sampler with a static buffer.

Pure-JAX primitives for the inhomogeneous spatiotemporal Poisson process (xtremax.point_processes.primitives.ipp_spatiotemporal)

Name Kind What it does
ipp_spatiotemporal_chi_square_gof function Pearson \(\chi^2\) statistic from binned residuals.
ipp_spatiotemporal_intensity function Evaluate λ(s, t) = exp(log λ(s, t)) on a batch of events.
ipp_spatiotemporal_intensity_surface_at_time function Evaluate λ(s, t) on a tensor-product spatial grid at fixed t.
ipp_spatiotemporal_log_prob function Janossy log-likelihood \(\sum_i \log \lambda(s_i, t_i) - \Lambda\).
ipp_spatiotemporal_marginal_spatial_intensity function Compute \(\lambda_S(s) = \int_{t_0}^{t_1} \lambda(s, t)\, dt\).
ipp_spatiotemporal_marginal_temporal_intensity function Compute \(\lambda_T(t) = \int_D \lambda(s, t)\, ds\).
ipp_spatiotemporal_pearson_residuals function Pearson residuals on a tensor-product space-time grid.
ipp_spatiotemporal_predict_count function Mean and variance of the Poisson count over the integration domain.
ipp_spatiotemporal_sample_thinning function Lewis–Shedler thinning on D × [t_0, t_1).

Primitives for marked temporal point processes (xtremax.point_processes.primitives.marked)

Name Kind What it does
marks_log_prob function Sum of log f(mᵢ \| tᵢ, Hᵢ) over real events.
sample_marks_at_times function Draw marks mᵢ ~ f(· \| tᵢ, Hᵢ) at each observed time.

Primitives for marked spatial point processes (xtremax.point_processes.primitives.marked_spatial)

Name Kind What it does
sample_spatial_marks_at_locations function Draw marks mᵢ ~ f(· \| sᵢ) at every location.
spatial_marks_log_prob function Sum of log f(mᵢ \| sᵢ) over real events.

Primitives for marked spatiotemporal point processes (xtremax.point_processes.primitives.marked_spatiotemporal)

Name Kind What it does
sample_spatiotemporal_marks function Draw marks \(m_i \sim f(\cdot \mid s_i, t_i)\) at every event.
spatiotemporal_marks_log_prob function Sum of \(\log f(m_i \mid s_i, t_i)\) over real events.

Pure primitives for 1-D renewal temporal point processes (xtremax.point_processes.primitives.renewal)

Name Kind What it does
renewal_cumulative_hazard function \(\Lambda(\tau) = -\log S(\tau) = -\log(1 - F(\tau))\).
renewal_expected_count function Expected number of events on [0, T] via the renewal equation.
renewal_hazard function Hazard of the inter-event distribution: \(h(\tau) = f(\tau)/S(\tau)\).
renewal_intensity function Conditional intensity \(\lambda^*(t) = h(t - t_{N(t)})\).
renewal_inter_event_log_prob function Log density of an inter-event gap: log f(τ).
renewal_log_prob function Log-likelihood of an observed renewal-process sequence.
renewal_ogata_intensity_fn function Build a (t, history) -> λ*(t) closure usable by thinning samplers.
renewal_sample function Sample a renewal-process event sequence by accumulating gaps.
renewal_survival function S(τ) = 1 − F(τ) clipped to be non-negative.

Generic Ogata thinning sampler and retention primitives (xtremax.point_processes.primitives.thinning)

Name Kind What it does
retention_compensator function Compute the retention compensator via trapezoid quadrature.
thinning_retention_log_prob function Sum of log p(tᵢ \| Hᵢ, mᵢ) over retained events.
thinning_sample function Sample a history-dependent temporal point process via Ogata thinning.

xtremax.point_processes.operators

Name Kind What it does
ExponentialHawkes class Hawkes process with exponential excitation on [0, T].
ExponentialKernel class Exponential excitation kernel \(\phi(\tau) = \alpha e^{-\beta \tau}\).
GeneralHawkesProcess class Hawkes process with a user-supplied kernel module.
HomogeneousPoissonProcess class Homogeneous Poisson process on [0, T].
HomogeneousSpatialPP class Homogeneous spatial Poisson process on a rectangular domain.
HomogeneousSpatioTemporalPP class Homogeneous Poisson process on D × [t0, t1).
InhomogeneousPoissonProcess class Inhomogeneous Poisson process on [0, T].
InhomogeneousSpatialPP class Inhomogeneous spatial Poisson process on a rectangular domain.
InhomogeneousSpatioTemporalPP class Inhomogeneous Poisson process on D × [t0, t1).
MarkedSpatialPP class Separable marked spatial PP: ground process × mark distribution.
MarkedSpatioTemporalPP class Separable marked spatiotemporal PP: ground × mark distribution.
MarkedTemporalPointProcess class Separable marked TPP: ground process + time-/history-conditioned marks.
PiecewiseConstantLogIntensity class Piecewise-constant log-intensity as an eqx.Module.
RenewalProcess class Renewal process on [0, T] with a user-supplied inter-event law.
SpatioTemporalHawkes class ETAS-style separable exp-Gaussian Hawkes process.
ThinningProcess class Thinned TPP: base ground process + retention callable.

xtremax.point_processes.distributions

Name Kind What it does
ExponentialHawkes class NumPyro wrapper for an exponential-kernel Hawkes process.
GeneralHawkesProcess class NumPyro wrapper for a general-kernel Hawkes process.
HomogeneousPoissonProcess class NumPyro wrapper for a homogeneous temporal Poisson process.
HomogeneousSpatialPP class NumPyro wrapper for a homogeneous spatial Poisson process.
HomogeneousSpatioTemporalPP class NumPyro wrapper for a homogeneous spatiotemporal Poisson process.
InhomogeneousPoissonProcess class NumPyro wrapper for an inhomogeneous temporal Poisson process.
InhomogeneousSpatialPP class NumPyro wrapper for an inhomogeneous spatial Poisson process.
InhomogeneousSpatioTemporalPP class NumPyro wrapper for an inhomogeneous spatiotemporal Poisson process.
MarkedSpatialPP class NumPyro wrapper for a separable marked spatial Poisson process.
MarkedSpatioTemporalPP class NumPyro wrapper for a separable marked spatiotemporal Poisson process.
MarkedTemporalPointProcess class NumPyro wrapper for a separable marked temporal point process.
RenewalProcess class NumPyro wrapper for a renewal temporal point process.
SpatioTemporalHawkes class NumPyro wrapper for a separable exp-Gaussian spatiotemporal Hawkes process.
ThinningProcess class NumPyro wrapper for a thinned TPP.

xtremax.simulations

Variable-specific extreme value generators (xtremax.simulations.extremes)

Name Kind What it does
compute_climate_signal function Combines Spatial and Temporal fields to create a mean climate signal (Mu).
generate_spatial_field function Generates static spatial data: Lat, Lon, Elevation, Distance to Coast.
simulate_precip_extremes function Simulates Precipitation Extremes: 1.
simulate_temp_extremes function Simulates Block Maxima Temperature via the GEV distribution.
simulate_wind_extremes function Simulates Extreme Wind Speeds (Gusts) using Weibull distribution.

Synthetic spatial-domain generators (xtremax.simulations.spatial)

Name Kind What it does
SpatialFeatureExtractor class Static methods to derive physical features from a Digital Elevation Model (DEM).
augment_spatial_features function Pipeline to run all extractors and merge into Dataset.
compute_advanced_climate_signal function Generates Tmax and Precip Mean fields using advanced physics proxies.
create_iberian_domain function Creates the master spatial dataset with Lat, Lon, Elevation, and Land Mask.
generate_fractal_terrain function Generates coherent terrain using Fractal Brownian Motion (fBm).
generate_iberia_mask function Procedurally generates a boolean mask approximating the Iberian Peninsula and Balearic Islands using geometrical primitives.

Temporal GMST trajectory generators (xtremax.simulations.temporal)

Name Kind What it does
generate_gmst_trajectory function Generates a synthetic Global Mean Surface Temperature (GMST) anomaly curve.
generate_physical_gmst function Simulates Global Mean Surface Temperature (GMST) using a 0-D Energy Balance Model.