Reading Returned Objects¶
The main UniBM entrypoints return lightweight dataclasses rather than raw tuples. In practice, you usually only need a few headline fields first.
EVI fits¶
For a minimal EVI workflow:
import numpy as np
from unibm import estimate_design_life_level, estimate_evi_quantile
sample = np.random.default_rng(7).pareto(2.0, 4096) + 1.0
fit = estimate_evi_quantile(sample, quantile=0.5, sliding=True, bootstrap_reps=120)
design_life = estimate_design_life_level(fit, years=np.array([10.0, 50.0]))
Read the result in this order:
fit.slopeis the headline UniBMxiestimatefit.confidence_intervalgives the uncertainty interval forxifit.plateau_boundsshows which block-size window supported the fitfit.bootstrapstores the bootstrap metadata and covariance inputs used by FGLS fittingdesign_lifecontains the design-life-level estimates on the original data scale
The remaining fields such as curve and plateau are mainly for plotting,
diagnostics, and workflow-side reuse.
EI fits¶
For a minimal EI workflow:
import numpy as np
from unibm.ei.preparation import prepare_ei_bundle
from unibm.ei.bm import estimate_pooled_bm_ei
sample = np.random.default_rng(21).pareto(2.0, 4096) + 1.0
bundle = prepare_ei_bundle(sample)
fit = estimate_pooled_bm_ei(bundle, base_path="bb", sliding=True, regression="OLS")
Read the result in this order:
fit.theta_hatis the headline extremal-index estimatefit.confidence_intervalgives the uncertainty interval forthetafit.stable_windowshows which block-size region was pooledfit.base_pathandfit.regressionrecord which BM path and pooling rule produced the estimate
The path-level fields are supporting diagnostics:
fit.path_levelrecords the observed block sizes retained on the finite pathfit.path_thetaandfit.path_eirretain the observed path values for plotting and method audits
FGLS versus OLS¶
Pooled EI fits always pool the observed stable-window path. If you switch from
regression="OLS" to regression="FGLS", the observed path is still what
gets pooled. The bootstrap result only contributes the cross-block covariance
matrix used for FGLS weighting.