An error occurred while loading the file. Please try again.
-
Le Roux Erwan authoreda1a75f01
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from extreme_estimator.estimator.abstract_estimator import AbstractEstimator
from extreme_estimator.extreme_models.max_stable_model.max_stable_models import Smith, BrownResnick
from experiment.robustness_plot.estimation_robustness.max_stable_process_plot import MultipleMaxStableProcessPlot, MaxStableProcessPlot
from experiment.robustness_plot.single_plot import SinglePlot
from spatio_temporal_dataset.coordinates.spatial_coordinates.alps_station_2D_coordinates import \
AlpsStation2DCoordinatesBetweenZeroAndOne, AlpsStationCoordinatesBetweenZeroAndTwo
from spatio_temporal_dataset.coordinates.spatial_coordinates.generated_spatial_coordinates import CircleCoordinates, \
CircleCoordinatesRadius2
# def single_spatial_robustness_alps():
# spatial_robustness = SingleMspSpatial(grid_row_item=SingleMspSpatial.NbObservationItem,
# grid_column_item=SingleMspSpatial.SpatialCoordinateClassItem,
# plot_row_item=SingleMspSpatial.NbStationItem,
# plot_label_item=SingleMspSpatial.MaxStableModelItem)
# # Put only the parameter that will vary
# spatial_robustness.robustness_grid_plot(**{
# SingleMspSpatial.NbStationItem.name: list(range(43, 87, 15)),
# SingleMspSpatial.NbObservationItem.name: [10],
# SingleMspSpatial.MaxStableModelItem.name: [Smith(), BrownResnick()][:],
# SingleMspSpatial.SpatialCoordinateClassItem.name: [CircleCoordinatesRadius1,
# AlpsStationCoordinatesBetweenZeroAndOne][:],
# })
def multiple_unidimensional_robustness():
nb_observation = 20
nb_sample = 1
plot_name = 'fast_result'
nb_stations = list(range(43, 87, 15))
# nb_stations = [10, 20, 30]
spatial_robustness = MultipleMaxStableProcessPlot(
grid_column_item=MaxStableProcessPlot.CoordinateClassItem,
plot_row_item=MaxStableProcessPlot.NbStationItem,
plot_label_item=MaxStableProcessPlot.MaxStableModelItem,
nb_samples=nb_sample,
main_title="Max stable analysis with {} years of spatio_temporal_observations".format(nb_observation),
plot_png_filename=plot_name
)
# Load all the models
msp_models = [Smith(), BrownResnick()]
# for covariance_function in CovarianceFunction:
# msp_models.extend([ExtremalT(covariance_function=covariance_function)])
# Put only the parameter that will vary
spatial_robustness.robustness_grid_plot(**{
SinglePlot.OrdinateItem.name: [AbstractEstimator.MAE_ERROR, AbstractEstimator.DURATION],
MaxStableProcessPlot.NbStationItem.name: nb_stations,
MaxStableProcessPlot.NbObservationItem.name: nb_observation,
MaxStableProcessPlot.MaxStableModelItem.name: msp_models,
MaxStableProcessPlot.CoordinateClassItem.name: [CircleCoordinates,
CircleCoordinatesRadius2,
AlpsStation2DCoordinatesBetweenZeroAndOne,
AlpsStationCoordinatesBetweenZeroAndTwo][:],
})
if __name__ == '__main__':
# single_spatial_robustness_alps()
multiple_unidimensional_robustness()