diff --git a/tests/test_PostProcessing.py b/tests/test_PostProcessing.py index 1f4af6c3be3568dd02c099cefd3c10ddbeb62b24..833e5fcfdcc77c40dea588571a1f21be574b5a04 100644 --- a/tests/test_PostProcessing.py +++ b/tests/test_PostProcessing.py @@ -23,7 +23,6 @@ import os from bayesvalidrox.post_processing.post_processing import PostProcessing from bayesvalidrox.surrogate_models.inputs import Input -from bayesvalidrox.surrogate_models.input_space import InputSpace from bayesvalidrox.surrogate_models.exp_designs import ExpDesigns from bayesvalidrox.surrogate_models.surrogate_models import MetaModel from bayesvalidrox.surrogate_models.polynomial_chaos import PCE @@ -62,7 +61,6 @@ def basic_engine_trained(): engine.MetaModel = mm # Set up sequential design diagnostics data - num_steps = 3 # Number of sequential design steps engine.SeqModifiedLOO = {'Z': np.array([0.1, 0.2, 0.3])} engine.seqValidError = {'Z': np.array([0.15, 0.25, 0.35])} engine.SeqKLD = {'Z': np.array([0.05, 0.1, 0.15])} @@ -128,6 +126,7 @@ def basic_engine_sequential(): @pytest.fixture def pce_engine(): inp = Input() + inp.add_marginals() inp.Marginals[0].name = 'x' inp.Marginals[0].dist_type = 'normal' @@ -200,7 +199,7 @@ def gpe_engine(): inp.Marginals[0].parameters = [0, 1] expdes = ExpDesigns(inp) - expdes.init_param_space(max_deg=1) + expdes.init_param_space() expdes.X = np.array([[0], [1], [0.5]]) expdes.Y = {'Z': [[0.4], [0.5], [0.45]]} expdes.x_values = [0] @@ -397,16 +396,6 @@ def test_check_reg_quality_gpe(gpe_engine) -> None: post.check_reg_quality(samples=engine.ExpDesign.X, outputs=engine.ExpDesign.Y) # Add assertions to check the quality metrics if available -# def test_check_reg_quality_with_invalid_outputs(pce_engine) -> None: -# """ -# Check the regression quality with invalid outputs -# """ -# engine = pce_engine -# post = PostProcessing(engine) -# with pytest.raises(AttributeError) as excinfo: -# post.check_reg_quality(samples=engine.ExpDesign.X, outputs=None) -# assert "Please provide the outputs of the model!" in str(excinfo.value) - #%% plot_metamodel_3d def test_plot_metamodel_3d_pce(pce_engine_3d_plot) -> None: """