bootstrap_pod_ci

bootstrap_pod_ci(
    X,
    y,
    X_eval,
    threshold,
    model_type,
    model_params,
    bandwidth,
    dist_info,
    n_boot=1000,
    nuisance_ranges=None,
    n_jobs=None,
    feature_names=None,
    poi_names=None,
    confidence_levels=None,
    nuisance_dists=None,
    progress_callback=None,
    n_mc_samples=BOOTSTRAP_MC_SAMPLES,
)

Estimates Confidence Bounds for the PoD curve via Bootstrapping.

This function resamples the original data with replacement n_boot times. For each resample, it refits the Mean Model (dynamically rebuilding either a Polynomial or Kriging model), recalculates residuals, and generates a new PoD curve. If Kriging is selected, the optimizer is disabled during bootstrapping to remain computationally tractable [digiqual]: each resample reuses the fitted kernel (including its learned WhiteKernel noise level) and the full-data input scaling via build_fixed_kernel_gpr, so only the posterior mean is recomputed. [M25] Sec. 2i re-estimates the model on every resample, so this interval does not include the uncertainty in the Kriging hyperparameters. Kriging residuals for the variance model are leave-one-out residuals, matching fit_variance_model.

Parameters

Name Type Description Default
X np.ndarray Training inputs, shape (n_samples,) or (n_samples, n_features). required
y np.ndarray Training responses, shape (n_samples,). required
X_eval np.ndarray Points at which the PoD curve is evaluated, shape (n_points,) or (n_points, n_poi). required
threshold float Detection threshold on the response. required
model_type str 'Polynomial' or 'Kriging'. required
model_params Any The polynomial degree, or for Kriging the model’s model_params_ dict (kernel, x_mean, x_std). required
bandwidth float Kernel-smoothing bandwidth for the variance model. required
dist_info tuple[str, tuple] Residual distribution as (scipy.stats name, parameters); refitted on each resample. required
n_boot int Number of bootstrap resamples. Defaults to 1000. 1000
nuisance_ranges dict | None {name: (min, max)} for nuisance inputs that are integrated out. Defaults to None. None
n_jobs int | None Number of parallel workers. Defaults to None. None
feature_names list | None Names of all inputs, in column order. Defaults to None. None
poi_names list | None Names of the parameters of interest. Defaults to None. None
confidence_levels list | None Confidence levels in percent (for example [90, 95]). Defaults to None (95% only). None
nuisance_dists dict | None Distributions of the nuisance inputs. Defaults to None (uniform over nuisance_ranges). None
progress_callback Any Optional callable for progress updates. Defaults to None. None
n_mc_samples int Monte Carlo samples per PoD evaluation in each resample. Defaults to BOOTSTRAP_MC_SAMPLES. BOOTSTRAP_MC_SAMPLES

Returns

Name Type Description
tuple[np.ndarray, np.ndarray] | dict tuple[np.ndarray, np.ndarray] | dict: (lower, upper) 95% percentile bounds, each shape (n_points,), if confidence_levels is None; otherwise a dict {level: (lower, upper)} for each level.