You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our Canadian friends wants to run risk calculations on Vancouver and want to know how many sample should they take from the 21,000+ realizations of the full model. This is currently hard to guess and involves running a lot of very slow calculations to manually check the stability of the results.
We could instead run a classical calculation on the interesting site with full enumeration (if possible, otherwise with a lot of samples) and then call a view
oq show clusterize_hcurves:<k>
that would collect together similar hazard curves in clusters(using scipy.cluster.vq.kmeans2) and would print a representative for each cluster.
A possible syntax could be the following, for a case with 2187 realizations (1 source model, 7 TRTs of 3 GMPEs each, 3^7=2187) reduced to 9 clusters, assuming 5 TRTs are not relevant:
Then it is possible to manually tweak the files source_model_logic_tree.xml and gsim_logic_tree.xml and reduce the logic tree to 9 realizations instead of 2187. Then the event_based_risk calculation can be run on the reduced logic tree.
The text was updated successfully, but these errors were encountered:
This is a good idea. We need to carefully think about the metric used to calculate distances (typically a key problem in cluster analysis). Also I would suggest to give the user the possibility to define a range of probabilities that can be used to extract a part of a hazard curve for the cluster analysis.
Our Canadian friends wants to run risk calculations on Vancouver and want to know how many sample should they take from the 21,000+ realizations of the full model. This is currently hard to guess and involves running a lot of very slow calculations to manually check the stability of the results.
We could instead run a classical calculation on the interesting site with full enumeration (if possible, otherwise with a lot of samples) and then call a view
that would collect together similar hazard curves in clusters(using
scipy.cluster.vq.kmeans2
) and would print a representative for each cluster.A possible syntax could be the following, for a case with 2187 realizations (1 source model, 7 TRTs of 3 GMPEs each, 3^7=2187) reduced to 9 clusters, assuming 5 TRTs are not relevant:
We already have a view to connect one-letter abbreviations to the branch IDs:
Then it is possible to manually tweak the files source_model_logic_tree.xml and gsim_logic_tree.xml and reduce the logic tree to 9 realizations instead of 2187. Then the event_based_risk calculation can be run on the reduced logic tree.
The text was updated successfully, but these errors were encountered: