smash.Model.signatures_sensitivity#
- Model.signatures_sensitivity(problem=None, n=64, sign=None, event_seg=None, random_state=None)[source]#
Compute the first- and total-order variance-based sensitivity (Sobol indices) of spatially uniform hydrological model parameters on the output signatures.
Hint
See the User Guide and Math / Num Documentation for more.
- Parameters:
- problemdict or None, default None
Problem definition to generate a multiple set of spatially uniform Model parameters. The keys are
‘num_vars’ : the number of Model parameters.
‘names’ : the name of Model parameters.
‘bounds’ : the upper and lower bounds of each Model parameters (a sequence of
(min, max)).
Note
If not given, the problem will be set automatically using
smash.Model.get_bound_constraintsmethod.- nint, default 64
Number of trajectories to generate for each model parameter (ideally a power of 2). Then the number of sample to generate is equal to \(N(D+2)\) where \(D\) is the number of model parameters.
See here for more details.
- signstr, list or None, default None
Define signature(s) to compute. Should be one of
‘Crc’, ‘Crchf’, ‘Crclf’, ‘Crch2r’, ‘Cfp2’, ‘Cfp10’, ‘Cfp50’, ‘Cfp90’ (continuous signatures)
‘Eff’, ‘Ebf’, ‘Erc’, ‘Erchf’, ‘Erclf’, ‘Erch2r’, ‘Elt’, ‘Epf’ (flood event signatures)
Note
If not given, all of continuous and flood event signatures will be computed.
- event_segdict or None, default None
A dictionary of event segmentation options when calculating flood event signatures. The keys are
‘peak_quant’
‘max_duration’
See
smash.Model.event_segmentationfor more.Note
If not given in case flood signatures are computed, the default values will be set for these parameters.
- random_stateint or None, default None
Random seed used to generate samples for sensitivity computation.
Note
If not given, generates the parameters set with a random seed.
- Returns:
- resSignSensResult
The signatures sensitivity computation results represented as a
SignSensResultobject.
See also
SignSensResultRepresents signatures sensitivity computation result.
Examples
>>> setup, mesh = smash.load_dataset("cance") >>> model = smash.Model(setup, mesh) >>> res = model.signatures_sensitivity(random_state=99)
Total-order sensitivity indices of production parameter cp on continuous signatures:
>>> res.cont["total_si"]["cp"] code Crc Crchf ... Cfp50 Cfp90 0 V3524010 0.089630 0.023528 ... 1.092226 0.009049 1 V3515010 0.064792 0.023358 ... 0.353862 0.011404 2 V3517010 0.030655 0.028925 ... 0.113354 0.010977
[3 rows x 9 columns]
First-order sensitivity indices of linear routing parameter lr on flood event signatures:
>>> res.event["first_si"]["lr"] code season start ... Elt Epf 0 V3524010 autumn 2014-11-03 03:00:00 ... 0.358599 0.015600 1 V3515010 autumn 2014-11-03 10:00:00 ... 0.344644 0.010241 2 V3517010 autumn 2014-11-03 08:00:00 ... 0.063007 0.010851
[3 rows x 12 columns]