diff --git a/examples/pollution/test_valid_pollution.py b/examples/pollution/test_valid_pollution.py index f4a03957adb460de11620ca75c3664e093ab0bd3..1deea2f29e124bdfb66d9b0008a058821161c0e1 100644 --- a/examples/pollution/test_valid_pollution.py +++ b/examples/pollution/test_valid_pollution.py @@ -147,15 +147,15 @@ if __name__ == "__main__": # >>>>>>>>>>>>>>>>>>>>>> Build Surrogate <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< # Adaptive sparse arbitrary polynomial chaos expansion - # PCEModel = MetaModelOpts.create_metamodel(Model) + PCEModel = MetaModelOpts.create_metamodel(Model) - # # Save PCE models - # with open(f"PCEModel_{Model.name}.pkl", "wb") as output: - # joblib.dump(PCEModel, output, 2) + # Save PCE models + with open(f"PCEModel_{Model.name}.pkl", "wb") as output: + joblib.dump(PCEModel, output, 2) # Load the objects - with open(f"PCEModel_{Model.name}.pkl", "rb") as input: - PCEModel = joblib.load(input) + # with open(f"PCEModel_{Model.name}.pkl", "rb") as input: + # PCEModel = joblib.load(input) # ===================================================== # ========= POST PROCESSING OF METAMODELS =========== @@ -209,15 +209,15 @@ if __name__ == "__main__": BayesOpts.Discrepancy = Discrepancy(DiscOutputOpts) # Start the inference - # BayesCalib = BayesOpts.create_inference() + BayesCalib = BayesOpts.create_inference() - # # Save class objects - # with open(f'Bayes_{Model.name}.pkl', 'wb') as output: - # joblib.dump(BayesCalib, output, 2) + # Save class objects + with open(f'Bayes_{Model.name}.pkl', 'wb') as output: + joblib.dump(BayesCalib, output, 2) # Load the objects - with open(f"Bayes_{Model.name}.pkl", "rb") as input: - BayesCalib = joblib.load(input) + # with open(f"Bayes_{Model.name}.pkl", "rb") as input: + # BayesCalib = joblib.load(input) # ===================================================== # =========== BAYESIAN MODEL VALIDATION ==============