.. _method-importance_sampling:

"""""""""""""""""""
importance_sampling
"""""""""""""""""""


Importance sampling



**Topics**


uncertainty_quantification, aleatory_uncertainty_quantification_methods, sampling


.. toctree::
   :hidden:
   :maxdepth: 1

   method-importance_sampling-samples
   method-importance_sampling-seed
   method-importance_sampling-import
   method-importance_sampling-adapt_import
   method-importance_sampling-mm_adapt_import
   method-importance_sampling-refinement_samples
   method-importance_sampling-max_iterations
   method-importance_sampling-convergence_tolerance
   method-importance_sampling-response_levels
   method-importance_sampling-probability_levels
   method-importance_sampling-gen_reliability_levels
   method-importance_sampling-distribution
   method-importance_sampling-rng
   method-importance_sampling-model_pointer


**Specification**

- *Alias:* nond_importance_sampling 

- *Arguments:* None


**Child Keywords:**

+-------------------------+--------------------+----------------------------+-----------------------------------------------+
| Required/Optional       | Description of     | Dakota Keyword             | Dakota Keyword Description                    |
|                         | Group              |                            |                                               |
+=========================+====================+============================+===============================================+
| Optional                                     | `samples`__                | Number of samples for sampling-based methods  |
+----------------------------------------------+----------------------------+-----------------------------------------------+
| Optional                                     | `seed`__                   | Seed of the random number generator           |
+-------------------------+--------------------+----------------------------+-----------------------------------------------+
| Required (Choose One)   | Importance         | `import`__                 | Importance sampling option for probability    |
|                         | Sampling Approach  |                            | refinement                                    |
|                         |                    +----------------------------+-----------------------------------------------+
|                         |                    | `adapt_import`__           | Importance sampling option for probability    |
|                         |                    |                            | refinement                                    |
|                         |                    +----------------------------+-----------------------------------------------+
|                         |                    | `mm_adapt_import`__        | Importance sampling option for probability    |
|                         |                    |                            | refinement                                    |
+-------------------------+--------------------+----------------------------+-----------------------------------------------+
| Optional                                     | `refinement_samples`__     | Number of samples used to refine a probabilty |
|                                              |                            | estimate or sampling design.                  |
+----------------------------------------------+----------------------------+-----------------------------------------------+
| Optional                                     | `max_iterations`__         | Number of iterations allowed for optimizers   |
|                                              |                            | and adaptive UQ methods                       |
+----------------------------------------------+----------------------------+-----------------------------------------------+
| Optional                                     | `convergence_tolerance`__  | Stopping criterion based on objective         |
|                                              |                            | function or statistics convergence            |
+----------------------------------------------+----------------------------+-----------------------------------------------+
| Optional                                     | `response_levels`__        | Values at which to estimate desired           |
|                                              |                            | statistics for each response                  |
+----------------------------------------------+----------------------------+-----------------------------------------------+
| Optional                                     | `probability_levels`__     | Specify probability levels at which to        |
|                                              |                            | estimate the corresponding response value     |
+----------------------------------------------+----------------------------+-----------------------------------------------+
| Optional                                     | `gen_reliability_levels`__ | Specify generalized relability levels at      |
|                                              |                            | which to estimate the corresponding response  |
|                                              |                            | value                                         |
+----------------------------------------------+----------------------------+-----------------------------------------------+
| Optional                                     | `distribution`__           | Selection of cumulative or complementary      |
|                                              |                            | cumulative functions                          |
+----------------------------------------------+----------------------------+-----------------------------------------------+
| Optional                                     | `rng`__                    | Selection of a random number generator        |
+----------------------------------------------+----------------------------+-----------------------------------------------+
| Optional                                     | `model_pointer`__          | Identifier for model block to be used by a    |
|                                              |                            | method                                        |
+----------------------------------------------+----------------------------+-----------------------------------------------+

.. __: method-importance_sampling-samples.html
__ method-importance_sampling-seed.html
__ method-importance_sampling-import.html
__ method-importance_sampling-adapt_import.html
__ method-importance_sampling-mm_adapt_import.html
__ method-importance_sampling-refinement_samples.html
__ method-importance_sampling-max_iterations.html
__ method-importance_sampling-convergence_tolerance.html
__ method-importance_sampling-response_levels.html
__ method-importance_sampling-probability_levels.html
__ method-importance_sampling-gen_reliability_levels.html
__ method-importance_sampling-distribution.html
__ method-importance_sampling-rng.html
__ method-importance_sampling-model_pointer.html



**Description**


The ``importance_sampling`` method is based on ideas in reliability modeling.

An initial Latin Hypercube sampling is performed to generate an initial set of samples.
These initial samples are augmented with samples from an importance density as follows:

- The variables are transformed to standard normal space.
- In the transformed space,     the importance density is a set of normal densities centered around points which     are in the failure region.
- Note that this is similar in spirit to the reliability     methods, in which importance sampling is centered around a Most Probable Point (MPP).
- In the case of the LHS samples, the importance sampling density will simply by     a mixture of normal distributions centered around points in the failure region.

*Options*

Choose one of the importance sampling options:

- ``import``
- ``adapt_import``
- ``mm_adapt_import``

The options for importance sampling are as follows: ``import`` centers a sampling
density at one of the initial LHS samples identified in the failure region.
It then generates the importance samples, weights them by their probability of occurence
given the original density, and calculates the required probability (CDF or CCDF level).
``adapt_import`` is the same as ``import`` but is performed iteratively until the
failure probability estimate converges.
``mm_adapt_import`` starts with all of the samples located in the failure region
to build a multimodal sampling density. First, it uses a small number of samples around
each of the initial samples in the failure region. Note that these samples
are allocated to the different points based on their relative probabilities of occurrence:
more probable points get more samples. This early part of the approach is done
to search for "representative" points. Once these are located, the multimodal sampling
density is set and then ``mm_adapt_import`` proceeds similarly to ``adapt_import`` (sample
until convergence).



**Theory**


Importance sampling is a method that allows one to estimate statistical
quantities such as failure probabilities (e.g. the probability that
a response quantity will exceed a threshold or fall below a threshold value)
in a way that is more efficient than Monte Carlo sampling. The core idea
in importance sampling is that one generates samples that preferentially
samples important regions in the space (e.g. in or near the failure region
or user-defined region of interest), and then appropriately weights
the samples to obtain an unbiased estimate of the failure probability
:cite:p:`Srinivasan2002`.
In importance sampling, the samples are generated from a density which is
called the importance density: it is not the original probability density
of the input distributions. The importance density should be centered near the
failure region of interest. For black-box simulations such as those commonly
interfaced with Dakota, it is difficult to specify the importance density a priori:
the user often does not know where the failure region lies, especially in a high-dimensional
space. :cite:p:`Swiler2010`.
We have developed two importance sampling approaches which do not
rely on the user explicitly specifying an importance density.


