volcapy.uq package¶
Submodules¶
volcapy.uq.azzimonti module¶
(DEPRECATED) Module implementing estimation of excursion sets and uncertainty quantification on them.
SHOULD BE ADAPTED TO THE NEW GAUSSIANPROCESS CLASS.
-
class
volcapy.uq.azzimonti.
GaussianProcess
(mean, variance, covariance_func)[source]¶ Bases:
object
Implementation of Gaussian Process.
The underlying spatial structure is just a list of points, that is, we do not need to know the real spatial structure, the GP only know the mean/variance/covariance at points number i or j.
- Parameters
- mean: 1D array-like
List (or ndarray). Element i gives the mean at point i.
- variance: 1D array-like
Variance at every point.
- covariance_func: function
Two parameter function. F(i, j) should return the covariance between points i and j.
Methods
compute_excursion_probs
(threshold)Computes once and for all the probability of excursion above threshold for every point.
coverage_fct
(i, threshold)Coverage function (excursion probability) at a point.
expected_excursion_measure
(threshold)Get the expected measure of the excursion set above the given threshold.
vorobev_deviation
(set_inds, threshold)Compute the Vorob’ev deviation of a given set.
vorobev_expectation_inds
(threshold)Get cells belonging to the Vorobev expectation.
vorobev_quantile_inds
(alpha, threshold)Get the cells belonging Vorobev quantile alpha.
-
compute_excursion_probs
(threshold)[source]¶ Computes once and for all the probability of excursion above threshold for every point.
- Parameters
- threshold: float
- Returns
- List[float]
Excursion probabilities. Element i contains excursion probability (above threshold) for element i.
-
coverage_fct
(i, threshold)[source]¶ Coverage function (excursion probability) at a point.
Given a point in space, gives the probability that the value of the GP at that point is above some threshold.
- Parameters
- i: int
Index of the point to consider.
- threshold: float
- Returns
- float
Probability that value of the field at point is above the threshold.
-
expected_excursion_measure
(threshold)[source]¶ Get the expected measure of the excursion set above the given threshold.
- Parameters
- threshold: float
Excursion threshold
- Returns
- flot
Expected size (in number of cells) of the excursion set above the given threshold.
-
vorobev_deviation
(set_inds, threshold)[source]¶ Compute the Vorob’ev deviation of a given set.
- Parameters
- set_inds: List[int]
Indices of the cells belonging to the set.
- threshold: float
Excursion threshold.
- Returns
- float
Vorob’ev deviation of the set.
-
vorobev_expectation_inds
(threshold)[source]¶ Get cells belonging to the Vorobev expectation.
- Parameters
- threshold: float
Excursion threshold.
- Returns
- List[int]
List of the indices of the points that are in the Vorobev quantile.
-
vorobev_quantile_inds
(alpha, threshold)[source]¶ Get the cells belonging Vorobev quantile alpha.
- Parameters
- alpha: float
Level of the quantile to return. Will return points that have a prob greater than alpha to be in the excursion set.
- threshold: float
Excursion threshold.
- Returns
- List[int]
List of the indices of the points that are in the Vorobev quantile.
volcapy.uq.example_azzimonti module¶
Run script for the Azzimonti techniques. It assumes posterior mean and variance have already been computed and stored as static files.