diff --git a/extreme_fit/estimator/margin_estimator/abstract_margin_estimator.py b/extreme_fit/estimator/margin_estimator/abstract_margin_estimator.py index bf20379cf0bd4a6540c797c7a469ebf09880508e..5e36bfcd6f6a54b88efcafed09bcb4442801bb66 100644 --- a/extreme_fit/estimator/margin_estimator/abstract_margin_estimator.py +++ b/extreme_fit/estimator/margin_estimator/abstract_margin_estimator.py @@ -55,7 +55,7 @@ class LinearMarginEstimator(AbstractMarginEstimator): assert len( maximum) == 1, 'So far, only one observation for each coordinate, but code would be easy to change' maximum = maximum[0] - gev_params = self.function_from_fit.get_params(coordinate, is_transformed=False) + gev_params = self.function_from_fit.get_params(coordinate, is_transformed=True) p = gev_params.density(maximum) nllh -= np.log(p) assert not np.isinf(nllh) diff --git a/extreme_fit/model/margin_model/linear_margin_model/temporal_linear_margin_models.py b/extreme_fit/model/margin_model/linear_margin_model/temporal_linear_margin_models.py index c9626a486720972dcd780d276da4b44dcf2f0dec..fde5b9c6e42f09d3bf1cc66e86daa438fe4d2c95 100644 --- a/extreme_fit/model/margin_model/linear_margin_model/temporal_linear_margin_models.py +++ b/extreme_fit/model/margin_model/linear_margin_model/temporal_linear_margin_models.py @@ -126,6 +126,10 @@ class GumbelTemporalModel(StationaryTemporalModel): super().__init__(coordinates, params_user, starting_point, fit_method, nb_iterations_for_bayesian_fit, params_initial_fit_bayesian, type_for_MLE="Gumbel") + @property + def nb_params(self): + return super().nb_params - 1 + class NonStationaryLocationGumbelModel(GumbelTemporalModel, NonStationaryLocationTemporalModel): pass