diff --git a/src/bayesvalidrox/post_processing/post_processing.py b/src/bayesvalidrox/post_processing/post_processing.py index abafb123d266f7cb95d51ba38be0ab8b66b56415..e61de97c74123a656312b39779f0dd2559c347d8 100644 --- a/src/bayesvalidrox/post_processing/post_processing.py +++ b/src/bayesvalidrox/post_processing/post_processing.py @@ -524,19 +524,8 @@ class PostProcessing: # ------------------------------------------------------------------------- def sobol_indices(self, xlabel: str = 'Time [s]', plot_type: str = None, save:bool=True): """ - 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 498cb76e6d4fe23c7845dfd0a5aab616aa3cc013..a9f72c2eaae68b36010d357cb8498c0da1331fbb 100644 --- a/src/bayesvalidrox/surrogate_models/polynomial_chaos.py +++ b/src/bayesvalidrox/surrogate_models/polynomial_chaos.py @@ -935,8 +935,19 @@ class PCE(MetaModel): def calculate_sobol(self, save = True): """ - 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 ---------- @@ -944,8 +955,10 @@ class PCE(MetaModel): Returns ------- - sobol - totalsobol + sobol : dict + Sobol' indices of all available orders. + totalsobol : dict + Total Sobol' indices """ # Extract the necessary variables