pystra.active_learning.subset.SubsetSimulationEstimator#
Use it: User guide · Worked example · Theory
- class SubsetSimulationEstimator(*, n_samples=2000, conditional_probability=0.1, proposal_scale=0.5, max_levels=12, n_replications=4)[source]#
Bases:
EnrichmentEstimatorSubset simulation with replicated sampling and adaptive enrichment.
- Parameters:
n_samples (
int) – Samples per subset level per replication (default 2000, minimum 20). Used during exploration and independent final estimation.conditional_probability (
float) – Target intermediate probability, default 0.1, in (0, 1). At least two seeds and two nonseeds must result at this sample size.proposal_scale (
float) – pCN innovation standard deviation in (0, 1], default 0.5. The proposal is sqrt(1-scale**2)*u + scale*z, z ~ N(0,I). It is reversible for the normal prior; only the conditioning-event acceptance test is needed.max_levels (
int) – Maximum levels per replication, including the IID level (default 12). Unreached failure or stalled positive thresholds are explicit failures.n_replications (
int) – Independent complete subset runs (default 4, minimum 2). Their mean supplies Pf. Final CoV uses the larger of the empirical standard error across complete runs and the aggregated within-chain approximation.
Notes
Inputs are row-wise independent standard normal coordinates; failure is mean <= 0. Exploration conditions on mean - 2 std, so mean +/- 2 std failure events are nested inside every positive intermediate event. All three probabilities use the same prefix probability and final conditional population. Pooled levels are used only to select enrichment points.
Exploration restarts after every fit with common random numbers. Final estimation starts independent replications on the frozen surrogate mean. The CoV is an estimate, not a bound: a small replication count, shared surrogate bias, and missing disconnected modes can still mislead. No binomial confidence interval is assigned to dependent subset samples.
Methods
Run independent replications on the frozen mean failure event.
Resample optimistic subsets and pool their states for enrichment.
- estimate(predict, *, dimension, rng)[source]#
Run independent replications on the frozen mean failure event.
- Return type:
- explore(predict, *, dimension, rng, n_candidates)[source]#
Resample optimistic subsets and pool their states for enrichment.
Retain at most n_candidates unique points sampled uniformly from the union of level states. The pool cap changes selection cost only, not the probability calculation. Reject duplicate true observations in the runner, after sampling and before selection.
- Return type: