Skip to content
Snippets Groups Projects
Commit f0a055df authored by kohlhaasrebecca's avatar kohlhaasrebecca
Browse files

Small changes and tests

parent 8fa874ce
No related branches found
No related tags found
1 merge request!37Fix/post processing
Pipeline #51966 failed
...@@ -1027,7 +1027,7 @@ class PostProcessing: ...@@ -1027,7 +1027,7 @@ class PostProcessing:
# (not including the constant term) # (not including the constant term)
# TODO: this should work without PCE-specific values # TODO: this should work without PCE-specific values
length_list = [] length_list = []
for key, value in metamod._coeffs_dict["b_1"][key].items(): for _, value in metamod._coeffs_dict["b_1"][key].items():
length_list.append(len(value)) length_list.append(len(value))
n_predictors = min(length_list) n_predictors = min(length_list)
......
...@@ -229,6 +229,25 @@ def test_check_reg_quality_pce(pce_engine) -> None: ...@@ -229,6 +229,25 @@ def test_check_reg_quality_pce(pce_engine) -> None:
#%% _get_sample #%% _get_sample
#%% _eval_model #%% _eval_model
#%% _plot_validation #%% _plot_validation
def test_plot_validation(pce_engine) -> None:
"""
Check the regression quality for PCE metamodel
"""
engine = pce_engine
post = PostProcessing(engine)
post.pce_out_mean, post.pce_out_std = engine.eval_metamodel([[0],[0.5]])
post.model_out_dict = {'Z': [[0.4],[0.3]]}
post._plot_validation()
def test_plot_validation(gpe_engine) -> None:
"""
Check the regression quality for PCE metamodel
"""
engine = pce_engine
post = PostProcessing(engine)
post.pce_out_mean, post.pce_out_std = engine.eval_metamodel([[0],[0.5]])
post.model_out_dict = {'Z': [[0.4],[0.3]]}
post._plot_validation()
#%% _plot_validation_multi #%% _plot_validation_multi
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment