An error occurred while loading the file. Please try again.
-
Le Roux Erwan authored
[EXTREME ESTIMATOR] add margin_fits folder. add gpd params & gpdmle_fit. refactor code to handle gev and gpd together
f58c2bd9
from extreme_estimator.extreme_models.utils import r
"""
These two functions are “extremely light” functions to fit the GEV/GPD. These functions are mainlyuseful
to compute starting values for the Schlather and Smith mode
If more refined (univariate) analysis have to be performed, users should use more specialised pack-ages
- e.g. POT, evd, ismev, . . . .
"""
def spatial_extreme_gevmle_fit(x_gev):
res = r.gevmle(x_gev, method="Nelder")
return dict(zip(res.names, res))
def spatial_extreme_gpdmle_fit(x_gev, threshold):
res = r.gpdmle(x_gev, threshold, method="Nelder")
return dict(zip(res.names, res))
# todo: define more robust function gevmle_fit/gpdmle_fit