diff --git a/Outputs_SeqPosteriorComparison/posterior/Z.npy b/Outputs_SeqPosteriorComparison/posterior/Z.npy new file mode 100644 index 0000000000000000000000000000000000000000..8d89efa6714257ec2d867aa5eb95b7f23b915010 Binary files /dev/null and b/Outputs_SeqPosteriorComparison/posterior/Z.npy differ diff --git a/examples/convergence_tests/convergence_test.py b/examples/convergence/convergence.py similarity index 97% rename from examples/convergence_tests/convergence_test.py rename to examples/convergence/convergence.py index bc56e4cb897cde5cf95c5b832002814da831b663..08c77f24f3f472ec420ed8253573513fc66e868b 100644 --- a/examples/convergence_tests/convergence_test.py +++ b/examples/convergence/convergence.py @@ -4,7 +4,7 @@ import matplotlib.pyplot as plt import time -def convergence_test(engine, steps, error, train_samples, test_samples, +def convergence(engine, steps, error, train_samples, test_samples, test_data, plot = True, write = True): """ Tests the convergence for a metamodel over the number of given training diff --git a/examples/convergence_tests/example_trainingconvergence.py b/examples/convergence/example_trainingconvergence.py similarity index 94% rename from examples/convergence_tests/example_trainingconvergence.py rename to examples/convergence/example_trainingconvergence.py index d1aea4fe0de0d6467d525564965f8b6e052adda4..bfe8819bdb42dd0ba8e14bb0a839016a0d61a792 100644 --- a/examples/convergence_tests/example_trainingconvergence.py +++ b/examples/convergence/example_trainingconvergence.py @@ -17,7 +17,7 @@ from bayesvalidrox.surrogate_models.engine import Engine from bayesvalidrox.surrogate_models.exp_designs import ExpDesigns import bayesvalidrox.surrogate_models.surrogate_models as sm -from convergence_test import convergence_test +from convergence import convergence from testfunction import testfunction def error(mean, std, true): @@ -125,12 +125,12 @@ if __name__=="__main__": engine = Engine(MetaMod, Model, ExpDesign) # Run the convergence test - results_FastArd = convergence_test(engine, steps, error, train_samples, test_samples, test_data) + results_FastArd = convergence(engine, steps, error, train_samples, test_samples, test_data) # Change the loss function base-type new_type = 'ols' engine.MetaModel.pce_reg_method = new_type - results_OLS = convergence_test(engine, steps, error, train_samples, test_samples, test_data) + results_OLS = convergence(engine, steps, error, train_samples, test_samples, test_data) # Do OLS with Constraints # The actual constraints can currently be found and changed in @@ -138,7 +138,7 @@ if __name__=="__main__": # will be improved in future releases engine.MetaModel.apply_constraints = True engine.MetaModel.init_type = 'zeros' - results_PI_0rand = convergence_test(engine, steps, error, train_samples, test_samples, test_data) + results_PI_0rand = convergence(engine, steps, error, train_samples, test_samples, test_data) # Plot the results for key in results_FastArd[1]: diff --git a/examples/convergence_tests/testfunction.py b/examples/convergence/testfunction.py similarity index 100% rename from examples/convergence_tests/testfunction.py rename to examples/convergence/testfunction.py