diff --git a/experiment/paper_past_snow_loads/check_mle_convergence_for_trends/main_shape_repartition.py b/experiment/paper_past_snow_loads/check_mle_convergence_for_trends/main_shape_repartition.py index 953661f262c8e10a8d3352cceac547c0d8841bbb..e7c9f80b08c38ab366e3e5094e7b4c8d44e16e81 100644 --- a/experiment/paper_past_snow_loads/check_mle_convergence_for_trends/main_shape_repartition.py +++ b/experiment/paper_past_snow_loads/check_mle_convergence_for_trends/main_shape_repartition.py @@ -1,6 +1,6 @@ from experiment.meteo_france_data.scm_models_data.crocus.crocus import CrocusSnowLoadTotal from experiment.paper_past_snow_loads.check_mle_convergence_for_trends.study_visualizer_for_shape_repartition import \ - StudyVisualizerForShape, StudyVisualizerGumbel, StudyVisualizerAll + StudyVisualizerForShape from experiment.paper_past_snow_loads.paper_main_utils import load_altitude_to_visualizer @@ -28,6 +28,6 @@ if __name__ == '__main__': # main_shape_repartition([900], save_to_file=False) # main_shape_repartition([900, 1800, 2700]) # main_shape_repartition([300, 600, 900, 1200, 1500, 1800, 2700]) - main_shape_repartition([900], study_visualizer_class=StudyVisualizerAll, save_to_file=False) - # main_shape_repartition([300, 600, 900, 1200, 1500, 1800, 2100, 2400, 2700, 3000, 3300, 3600, 3900, 4200], - # study_visualizer_class=StudyVisualizerAll, save_to_file=True) + # main_shape_repartition([900], study_visualizer_class=StudyVisualizerForShape, save_to_file=False) + main_shape_repartition([300, 600, 900, 1200, 1500, 1800, 2100, 2400, 2700, 3000, 3300, 3600, 3900, 4200], + study_visualizer_class=StudyVisualizerForShape, save_to_file=True) diff --git a/experiment/paper_past_snow_loads/check_mle_convergence_for_trends/study_visualizer_for_shape_repartition.py b/experiment/paper_past_snow_loads/check_mle_convergence_for_trends/study_visualizer_for_shape_repartition.py index 9368d8ef278552191bdcc32db425bb9b1ef45422..729f7c538ce56f0622d9e3be3ae69d5823376e2c 100644 --- a/experiment/paper_past_snow_loads/check_mle_convergence_for_trends/study_visualizer_for_shape_repartition.py +++ b/experiment/paper_past_snow_loads/check_mle_convergence_for_trends/study_visualizer_for_shape_repartition.py @@ -6,8 +6,6 @@ from experiment.meteo_france_data.scm_models_data.abstract_study import Abstract from experiment.paper_past_snow_loads.study_visualizer_for_non_stationary_trends import \ StudyVisualizerForNonStationaryTrends from experiment.trend_analysis.abstract_score import MeanScore -from experiment.trend_analysis.univariate_test.extreme_trend_test.trend_test_one_parameter import \ - GevStationaryVersusGumbel class StudyVisualizerForShape(StudyVisualizerForNonStationaryTrends): @@ -32,7 +30,6 @@ class StudyVisualizerForShape(StudyVisualizerForNonStationaryTrends): @cached_property def massif_name_to_change_value(self): - print(self.massif_name_to_unconstrained_shape_parameter) return self.massif_name_to_unconstrained_shape_parameter @property @@ -48,36 +45,3 @@ class StudyVisualizerForShape(StudyVisualizerForNonStationaryTrends): return get_shifted_map(-self._max_abs_change, self._max_abs_change, matplotlib.cm.get_cmap('BrBG_r')) -class StudyVisualizerGumbel(StudyVisualizerForShape): - - def __init__(self, study: AbstractStudy, show=True, save_to_file=False, only_one_graph=False, only_first_row=False, - vertical_kde_plot=False, year_for_kde_plot=None, plot_block_maxima_quantiles=False, - temporal_non_stationarity=False, transformation_class=None, verbose=False, multiprocessing=False, - complete_non_stationary_trend_analysis=False, normalization_under_one_observations=True, - score_class=MeanScore, uncertainty_methods=None, non_stationary_contexts=None, - uncertainty_massif_names=None, effective_temporal_covariate=2017, relative_change_trend_plot=True): - super().__init__(study, show, save_to_file, only_one_graph, only_first_row, vertical_kde_plot, - year_for_kde_plot, plot_block_maxima_quantiles, temporal_non_stationarity, - transformation_class, verbose, multiprocessing, complete_non_stationary_trend_analysis, - normalization_under_one_observations, score_class, uncertainty_methods, - non_stationary_contexts, uncertainty_massif_names, effective_temporal_covariate, - relative_change_trend_plot) - # Assign default argument for the non stationary trends - self.non_stationary_trend_test = [GevStationaryVersusGumbel] - self.non_stationary_trend_test_to_marker = dict(zip(self.non_stationary_trend_test, ["o"])) - - -class StudyVisualizerAll(StudyVisualizerForShape): - - def __init__(self, study: AbstractStudy, show=True, save_to_file=False, only_one_graph=False, only_first_row=False, - vertical_kde_plot=False, year_for_kde_plot=None, plot_block_maxima_quantiles=False, - temporal_non_stationarity=False, transformation_class=None, verbose=False, multiprocessing=False, - complete_non_stationary_trend_analysis=False, normalization_under_one_observations=True, - score_class=MeanScore, uncertainty_methods=None, non_stationary_contexts=None, - uncertainty_massif_names=None, effective_temporal_covariate=2017, relative_change_trend_plot=True): - super().__init__(study, show, save_to_file, only_one_graph, only_first_row, vertical_kde_plot, - year_for_kde_plot, plot_block_maxima_quantiles, temporal_non_stationarity, - transformation_class, verbose, multiprocessing, complete_non_stationary_trend_analysis, - normalization_under_one_observations, score_class, uncertainty_methods, - non_stationary_contexts, uncertainty_massif_names, effective_temporal_covariate, - relative_change_trend_plot) diff --git a/experiment/paper_past_snow_loads/study_visualizer_for_non_stationary_trends.py b/experiment/paper_past_snow_loads/study_visualizer_for_non_stationary_trends.py index 862ac213818193a02ce247c3548a09ea6cc808c5..998a8126cc6fdb2889859bf816460236921ee2f5 100644 --- a/experiment/paper_past_snow_loads/study_visualizer_for_non_stationary_trends.py +++ b/experiment/paper_past_snow_loads/study_visualizer_for_non_stationary_trends.py @@ -76,7 +76,6 @@ class StudyVisualizerForNonStationaryTrends(StudyVisualizer): GevLocationAgainstGumbel, GevScaleAgainstGumbel, GevLocationAndScaleTrendTestAgainstGumbel ] self.non_stationary_trend_test_to_marker = {t: t.marker for t in self.non_stationary_trend_test} - # ["v", "^", "D", "X", "x", 7, 6, "d"])) else: self.non_stationary_trend_test = list(self.non_stationary_trend_test_to_marker.keys()) self.global_max_abs_change = None