pystra.active_learning.importance.ImportanceSamplingEstimator#

Use it: User guide · Worked example · Theory

class ImportanceSamplingEstimator(*, centers, scale=1.0, defensive_fraction=0.1, n_samples=10000, min_effective_failures=20)[source]#

Bases: EnrichmentEstimator

Independent Gaussian-mixture importance sampling for active reliability.

Parameters:
  • centers (ndarray) – Explicit row-wise proposal centers in independent normal coordinates, shape (n_centers, n_variables). A FORM standard_point is one useful center. Supply all relevant centers for separated failure regions.

  • scale (float) – Common spherical proposal standard deviation, default 1.

  • defensive_fraction (float) – Mixture weight of the target N(0,I), default 0.1, in [0,1). A positive fraction bounds likelihood ratios by its reciprocal but cannot guarantee discovery of an unrepresented rare failure mode.

  • n_samples (int) – IID mixture draws per exploration/final estimate, default 10000.

  • min_effective_failures (float) – Minimum effective failure contributions for a completed estimate, default 20. The final stopping policy additionally checks sampling CoV.

Notes

Uses the ordinary estimator mean(I*f/q), not a self-normalized ratio. Sampling SE is the sample standard deviation of I*f/q divided by sqrt(N). No binomial interval is reported. Bands use the same likelihood weights for mean +/- 2 std events and are clipped to probability limits only as diagnostics. An out-of-range point estimate is retained in diagnostics, exposed at the nearest endpoint and marked invalid with infinite CoV. Zero/all observed failures and inadequate effective failures are incomplete. Proposal centers remain fixed during a run; learning adapts the surrogate. Exploration reuses common random numbers; final estimation uses fresh draws.

Methods

estimate

Classify fresh IID proposal draws and retain weighted uncertainty.

explore

Supply proposal candidates and correctly weighted probability bands.

estimate(predict, *, dimension, rng)[source]#

Classify fresh IID proposal draws and retain weighted uncertainty.

Return type:

ReliabilityEstimate

explore(predict, *, dimension, rng, n_candidates)[source]#

Supply proposal candidates and correctly weighted probability bands.

Return type:

EnrichmentResult