Skip to content

EVI Namespace

The exported unibm.evi namespace groups the severity-side workflow: block extraction and summaries, plateau selection, covariance-aware fitting, design-life-level helpers, plotting helpers, and the public comparator families that remain part of the public package surface.

evi

Canonical EVI-facing UniBM subpackage.

DEFAULT_MIN_DISJOINT_BLOCKS = 15 module-attribute

DEFAULT_COVARIANCE_SHRINKAGE = 0.35 module-attribute

DEFAULT_CURVATURE_PENALTY = 2.0 module-attribute

Z_CRIT_95 = 1.96 module-attribute

ThresholdWindow = SelectionWindow module-attribute

__all__ = ['BlockSummaryBootstrapBackbone', 'BlockSummaryCurve', 'DEFAULT_COVARIANCE_SHRINKAGE', 'DEFAULT_CURVATURE_PENALTY', 'DEFAULT_MIN_DISJOINT_BLOCKS', 'ExternalXiEstimate', 'PlateauWindow', 'ScalingFit', 'SelectionWindow', 'ThresholdWindow', 'Z_CRIT_95', 'block_maxima', 'block_summary_curve', 'build_block_summary_bootstrap_backbone', 'candidate_max_spectrum_scales', 'candidate_tail_counts', 'circular_block_summary_bootstrap', 'circular_block_summary_bootstrap_multi_target', 'estimate_sample_mode', 'estimate_dedh_moment_evi', 'estimate_design_life_level', 'estimate_design_life_level_interval', 'estimate_evi_quantile', 'estimate_hill_evi', 'estimate_max_spectrum_evi', 'estimate_pickands_evi', 'estimate_target_scaling', 'evaluate_block_summary_bootstrap_backbone', 'generate_block_sizes', 'predict_block_quantile', 'plot_scaling_fit', 'select_penultimate_window', 'select_stable_integer_window', 'select_stable_tail_window', 'summarize_block_maxima', 'target_stability_summary', 'wald_confidence_interval'] module-attribute

BlockSummaryBootstrapBackbone dataclass

Reusable super-block bootstrap state for multiple block-summary targets.

BlockSummaryCurve dataclass

Block-maxima summaries evaluated over a block-size grid.

PlateauWindow dataclass

The selected intermediate block-size window used for regression.

ScalingFit dataclass

Full output of a UniBM log-log block-summary regression.

Most users should start with slope as the headline xi estimate, confidence_interval for uncertainty, plateau_bounds for the selected regression window, and bootstrap for any covariance-aware fit metadata. The remaining fields retain the full observed curve and fitted window for plotting, diagnostics, and workflow-side reuse.

ExternalXiEstimate dataclass

Point estimate plus diagnostic path information for comparator estimators.

selected_k property

Backward-compatible alias for threshold-indexed comparator paths.

path_k property

Backward-compatible alias for threshold-indexed comparator paths.

SelectionWindow dataclass

Selected stable window on one integer-indexed estimator path.

generate_block_sizes(n_obs, num_step=None, min_block_size=None, max_block_size=None, geom=True, min_disjoint_blocks=DEFAULT_MIN_DISJOINT_BLOCKS)

Generate an intermediate-range grid of block sizes.

block_maxima(vec, block_size, sliding=True)

Compute sliding or disjoint block maxima.

block_summary_curve(vec, block_sizes, *, sliding=True, quantile=0.5, target='quantile')

Summarize block maxima over multiple block sizes.

build_block_summary_bootstrap_backbone(vec, block_sizes, *, sliding=True, reps=200, super_block_size=None, random_state=0)

Precompute the shared super-block state for UniBM bootstrap fitting.

circular_block_summary_bootstrap(vec, block_sizes, *, target='quantile', quantile=0.5, sliding=True, reps=200, super_block_size=None, random_state=0)

Bootstrap one block-summary target by resampling time-series super-blocks.

circular_block_summary_bootstrap_multi_target(vec, block_sizes, *, targets=('quantile', 'mean', 'mode'), quantile=0.5, sliding=True, reps=200, super_block_size=None, random_state=0)

Bootstrap multiple block-summary targets from one shared backbone.

evaluate_block_summary_bootstrap_backbone(backbone, *, target='quantile', quantile=0.5)

Evaluate one block-summary target on a precomputed bootstrap backbone.

estimate_design_life_level(fit, years, *, observations_per_year=365.25, tau=None)

Map a fitted quantile-scaling law to design-life levels.

estimate_design_life_level_interval(fit, years, *, observations_per_year=365.25, tau=None, z_crit=Z_CRIT_95)

Return delta-method design-life intervals on the original response scale.

The fitted scaling law implies

log D(T) = alpha + xi * log(b_T),

so the log-scale variance follows from the fitted 2x2 coefficient covariance matrix cov_beta. The returned interval is pointwise and does not include any post-selection or model-class uncertainty beyond that covariance matrix.

predict_block_quantile(fit, block_size)

Predict a block quantile from the fitted scaling law.

estimate_evi_quantile(vec, *, quantile=0.5, sliding=True, block_sizes=None, num_step=None, min_block_size=None, max_block_size=None, bootstrap_reps=200, super_block_size=None, random_state=0, plateau_points=5, trim_fraction=0.15, curvature_penalty=DEFAULT_CURVATURE_PENALTY, covariance_shrinkage=DEFAULT_COVARIANCE_SHRINKAGE, curve=None, plateau=None, bootstrap_result=None)

Estimate the extreme value index from a block-quantile scaling law.

estimate_target_scaling(vec, *, target='quantile', quantile=0.5, sliding=True, block_sizes=None, num_step=None, min_block_size=None, max_block_size=None, bootstrap_reps=0, super_block_size=None, random_state=0, plateau_points=5, trim_fraction=0.15, curvature_penalty=DEFAULT_CURVATURE_PENALTY, covariance_shrinkage=DEFAULT_COVARIANCE_SHRINKAGE, curve=None, plateau=None, bootstrap_result=None)

Fit the UniBM log-log scaling model for an arbitrary block summary.

plot_scaling_fit(fit, *, file_path=None, dpi=1200, title=None, save=False, close=None, xlabel='log(block size)', ylabel=None)

Plot an EVI scaling fit on the log-log block-size scale.

select_penultimate_window(log_block_sizes, log_values, *, min_points=5, trim_fraction=0.15, curvature_penalty=2.0)

Choose an intermediate block-size window by balancing linearity and curvature.

candidate_max_spectrum_scales(n_obs, *, min_scale=1, min_blocks=2)

Construct dyadic block-size scales for max-spectrum estimation.

estimate_max_spectrum_evi(sample, *, scales=None, min_scale_count=3)

Estimate xi with the dependent max-spectrum estimator.

estimate_sample_mode(sample, *, warn=True)

Estimate a positive-sample mode via a log-scale KDE surrogate.

summarize_block_maxima(maxima, *, target, quantile=0.5)

Evaluate the requested summary target on one set of block maxima.

candidate_tail_counts(n_obs, *, min_count=8, max_fraction=0.25, num=24)

Construct a log-spaced threshold grid for raw-sample tail estimators.

estimate_dedh_moment_evi(sample, *, k_values=None)

Estimate xi with the DEdH moment estimator.

estimate_hill_evi(sample, *, k_values=None)

Estimate xi with Hill's raw-sample tail estimator.

estimate_pickands_evi(sample, *, k_values=None)

Estimate xi with the Pickands raw-sample tail estimator.

select_stable_integer_window(levels, path_xi, *, min_window=4)

Pick a stable integer-indexed window using variability and curvature.

select_stable_tail_window(k_values, path_xi, *, min_window=4)

Backward-compatible wrapper for k-indexed tail paths.

wald_confidence_interval(xi_hat, standard_error, *, ci_level=0.95)

Construct a Gaussian/Wald confidence interval around one xi estimate.

target_stability_summary(vec, block_sizes, *, sliding=True, quantile=0.5)

Compare quantile, mean, and mode block-maxima summaries on the same grid.