Extreme Values Modelling

Extreme Values Modelling#

The objective here is to compute return level, which are defined as events which intensity is exceeded with a given probably. For example, 100-yr return level are defined as the event that is exceeded on average once every hundred years.

To compute such values, one needs to extrapolate beyond the range of the observed values. The precise quantification of extreme values relies on the Extreme Value Theory that will not be detailed here (see [1] for a details introduction about the methods).

In this package, we rely on the Peaks Over Threshold (POT) approach: the data above a defined threshold is kept, independent exceedances are identified based on a time-separation criterion and a GPD distribution is fitted to the set of clusters maxima. The particular case of Exponential distribution is selected using an AIC criterion.

We also propose in this package to compute multivariate extremes using the methodology described in [2]. For the moment, only the Gaussian copula approach is implemented (a.k.a the Nataf Copula) and fitted on threshold exceedances. Environmental contours are estimated using the Huseby approach (see [2] for details).

resourcecode.eva.censgaussfit(data: ndarray, q: float) OptimizeResult#

Fit a censored Gaussian (Nataf) Copula to the data

Parameters:
  • data (a NxM nd-array) –

  • q (a float above which the model is fitted. Should be above 0.5.) –

Returns:

res – The optimization result represented as a OptimizeResult object. Important attributes are: x the solution array, success a Boolean flag indicating if the optimizer exited successfully and message which describes the cause of the termination. See OptimizeResult for a description of other attributes.

Return type:

OptimizeResult

resourcecode.eva.huseby(X: ndarray, prob: ndarray, ntheta: int)#

Compute the contours of X in the physical space.

Parameters:
  • X (a numpy array of size [NxM], with M = 2 or 3.) – This should be the output of the nataf simulation.

  • prob (a numpy array of size [1xM], with M = 2 or 3, describing the) – probability level of the contours

  • ntheta (the number of angles on [0, 360[, used for the calculation.) – it must be a multiple of 4.

Returns:

  • X (a numpy array of size [DxM])

  • Y (a numpy array of size [DxM])

  • Z (a numpy array of size [DxM]) – if M == 2

  • theta (a numpy array of size [DxM])

resourcecode.eva.run_simulation(rho: ndarray, quantile: float, gpd_parameters: ndarray, n_simulations: int = 1000) ndarray#

Run simulations from a fitted Nataf Model.

Parameters:
  • rho (np.ndarray) – estimated correlation coefficient from censored Nataf Copulas. output of the CensGaussFit function.

  • quant (float) – the quantile used for conditioning

  • gpd_parameters (np.ndarray) – estimated threshold and GPD parameters. output of the get_gpd_parameters.

  • n_simulations (int) – the requested number of simulations

Returns:

simulations

Return type:

A [NxM] numpy matrix with the result of the N simulations