diff --git a/examples/model-comparison/example_model_comparison.py b/examples/model-comparison/example_model_comparison.py index d55aa786a68d5f6dae5811d4816e230760386c69..a59af4667c6e3dc7bc65522e4948d7a81d218d83 100644 --- a/examples/model-comparison/example_model_comparison.py +++ b/examples/model-comparison/example_model_comparison.py @@ -29,11 +29,9 @@ from bayesvalidrox.pylink.pylink import PyLinkForwardModel from bayesvalidrox.surrogate_models.inputs import Input from bayesvalidrox.surrogate_models.exp_designs import ExpDesigns from bayesvalidrox.surrogate_models.surrogate_models import MetaModel -#from bayesvalidrox.surrogate_models.meta_model_engine import MetaModelEngine from bayesvalidrox.post_processing.post_processing import PostProcessing -from bayesvalidrox.bayes_inference.bayes_inference import BayesInference from bayesvalidrox.bayes_inference.discrepancy import Discrepancy -from bayes_inference.bayes_model_comparison import BayesModelComparison +from bayesvalidrox.bayes_inference.bayes_model_comparison import BayesModelComparison from bayesvalidrox.surrogate_models.engine import Engine @@ -280,7 +278,7 @@ if __name__ == "__main__": # BME Bootstrap options opts_bootstrap = { "bootstrap": True, - "n_samples": 100,#0,#0, # TODO: difference between this and the n_bootstrap set below? + "n_samples": 100,#0,#0,#0, # TODO: difference between this and the n_bootstrap set below? "Discrepancy": DiscrepancyOpts, "emulator": True, "plot_post_pred": False @@ -289,7 +287,7 @@ if __name__ == "__main__": # Run model comparison BayesOpts = BayesModelComparison( justifiability=True, - n_bootstrap=100,#0,#00, + n_bootstrap=100,#0,#0,#00, #just_n_meas=2 ) output_dict = BayesOpts.model_comparison_all( diff --git a/examples/only-model/test_analytical_function_noMetaMod.py b/examples/only-model/test_analytical_function_noMetaMod.py index 1d5139b0d86f2c545b28a881b6fa0d9ad3a74a96..7419d20a9115dfd2e5f7ba75276eb369c9164470 100644 --- a/examples/only-model/test_analytical_function_noMetaMod.py +++ b/examples/only-model/test_analytical_function_noMetaMod.py @@ -294,7 +294,7 @@ if __name__ == "__main__": # BME Bootstrap options opts_bootstrap = { "bootstrap": True, - "n_samples": 100,#0,#0, # TODO: difference between this and the n_bootstrap set below? + "n_samples": 10,#0,#0, # TODO: difference between this and the n_bootstrap set below? "Discrepancy": DiscrepancyOpts, "emulator": False, "plot_post_pred": False @@ -303,14 +303,17 @@ if __name__ == "__main__": # Run model comparison BayesOpts = BayesModelComparison( justifiability=True, - n_bootstrap=100,#0,#00, + n_bootstrap=10,#0,#00, #just_n_meas=2 emulator = False ) + # For Debug output_dict = BayesOpts.model_comparison_all( meta_models, opts_bootstrap ) + BayesOpts.model_names = ['linear', 'exponential', 'cosine'] + BayesOpts.calc_justifiability_analysis(meta_models, opts_bootstrap) # Save the results with open('model_comparison_output_dict.pkl', 'wb') as output: diff --git a/src/bayesvalidrox/surrogate_models/engine.py b/src/bayesvalidrox/surrogate_models/engine.py index 55417fe1a0d329239d7e4a13c904210f711fab04..bacf5acff59f672b1cf90eee8da22be10a04ca45 100644 --- a/src/bayesvalidrox/surrogate_models/engine.py +++ b/src/bayesvalidrox/surrogate_models/engine.py @@ -321,7 +321,7 @@ class Engine: if self.emulator: return mean_pred, std_pred else: - return mean_pred + return mean_pred, None # -------------------------------------------------------------------------