pystra.reliability.importance_sampling.ImportanceSampling#

Use it: User guide · Worked example · Theory

class ImportanceSampling(model, limit_state, *, options=None, form=None, rng=None)[source]#

Bases: _FORMReuse, CrudeMonteCarlo

Importance Sampling

To decrease the number of simulations and the coefficient of variation, other methods can be performed. One commonly applied method is the Importance Sampling simulation method (IS).

Parameters:
  • model (StochasticModel)

  • limit_state (LimitState)

  • options (SimulationOptions | None)

  • rng (int | integer | Sequence[int] | ndarray | SeedSequence | BitGenerator | Generator | None) – Random source; NumPy’s global generator is not used. A seed recreates the same stream on every run, a generator advances its own state, and None draws fresh entropy.

  • form (FORM | None) – A completed FORM analysis whose design point centers the samples. If None, run() first runs FORM with this analysis’s block size and transformation.

Methods

init_run

Initialize the model's isoprobabilistic transformation.

run

Run importance sampling and return a SimulationResult.

property form: FORM | None#

The last FORM analysis; assigning None requests a fresh FORM each run.

run()[source]#

Run importance sampling and return a SimulationResult.

Samples are centered on the FORM design point. If no completed FORM analysis was supplied, FORM is run first with this analysis’s block size and transformation.

Return type:

SimulationResult

init_run()#

Initialize the model’s isoprobabilistic transformation.

Uses the explicit copula or calibrates the legacy Gaussian Nataf correlation. Must be called at the start of every run() method in subclasses.

Return type:

None