diff --git a/src/bayesvalidrox/post_processing/post_processing.py b/src/bayesvalidrox/post_processing/post_processing.py index 9755d0dccd7248ddff38d7520cc0f6e42d863fed..3b33fd1e61d21b7b6a706b8ea46a2ec08f43e9e1 100644 --- a/src/bayesvalidrox/post_processing/post_processing.py +++ b/src/bayesvalidrox/post_processing/post_processing.py @@ -527,19 +527,8 @@ class PostProcessing: # ------------------------------------------------------------------------- def sobol_indices(self, xlabel: str = 'Time [s]', plot_type: str = None): """ - Provides Sobol indices as a sensitivity measure to infer the importance - of the input parameters. See Eq. 27 in [1] for more details. For the - case with Principal component analysis refer to [2]. - - [1] Global sensitivity analysis: A flexible and efficient framework - with an example from stochastic hydrogeology S. Oladyshkin, F.P. - de Barros, W. Nowak https://doi.org/10.1016/j.advwatres.2011.11.001 - - [2] Nagel, J.B., Rieckermann, J. and Sudret, B., 2020. Principal - component analysis and sparse polynomial chaos expansions for global - sensitivity analysis and model calibration: Application to urban - drainage simulation. Reliability Engineering & System Safety, 195, - p.106737. + Visualizes and writes out Sobol' and Total Sobol' indices of the trained metamodel. + One file is created for each index and output key. Parameters ---------- @@ -554,13 +543,6 @@ class PostProcessing: AttributeError MetaModel in given Engine needs to be of type 'pce' or 'apce'. - Returns - ------- - sobol_cell: dict - Sobol indices. - total_sobol: dict - Total Sobol indices. - """ # This function currently only supports PCE/aPCE metamod = self.engine.MetaModel diff --git a/src/bayesvalidrox/surrogate_models/polynomial_chaos.py b/src/bayesvalidrox/surrogate_models/polynomial_chaos.py index e39bc5bbea9d72948db7ac46c4bf7719b95c0f1a..620ea090885c3514f7ac2aa989d27951e2c86b5a 100644 --- a/src/bayesvalidrox/surrogate_models/polynomial_chaos.py +++ b/src/bayesvalidrox/surrogate_models/polynomial_chaos.py @@ -928,8 +928,19 @@ class PCE(MetaModel): def calculate_sobol(self, Y_train = None): """ - Calculates Sobol' indices of all possible orders and the Total Sobol' indices - based on the coefficients in the PCE. + Provides Sobol' indices as a sensitivity measure to infer the importance + of the input parameters. See Eq. 27 in [1] for more details. For the + case with Principal component analysis refer to [2]. + + [1] Global sensitivity analysis: A flexible and efficient framework + with an example from stochastic hydrogeology S. Oladyshkin, F.P. + de Barros, W. Nowak https://doi.org/10.1016/j.advwatres.2011.11.001 + + [2] Nagel, J.B., Rieckermann, J. and Sudret, B., 2020. Principal + component analysis and sparse polynomial chaos expansions for global + sensitivity analysis and model calibration: Application to urban + drainage simulation. Reliability Engineering & System Safety, 195, + p.106737. Parameters ---------- @@ -939,8 +950,10 @@ class PCE(MetaModel): Returns ------- - sobol - totalsobol + sobol : dict + Sobol' indices of all available orders. + totalsobol : dict + Total Sobol' indices """ max_order = np.max(self._pce_deg)