Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
BayesValidRox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
inversemodeling
BayesValidRox
Commits
0ab15fe8
Commit
0ab15fe8
authored
5 months ago
by
kohlhaasrebecca
Browse files
Options
Downloads
Patches
Plain Diff
Update PostProcessing tests
parent
724c57a7
No related branches found
No related tags found
1 merge request
!37
Fix/post processing
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+4
-1
4 additions, 1 deletion
.gitignore
src/bayesvalidrox/post_processing/post_processing.py
+149
-137
149 additions, 137 deletions
src/bayesvalidrox/post_processing/post_processing.py
tests/test_PostProcessing.py
+5
-4
5 additions, 4 deletions
tests/test_PostProcessing.py
with
158 additions
and
142 deletions
.gitignore
+
4
−
1
View file @
0ab15fe8
...
@@ -32,4 +32,7 @@ Outputs_*
...
@@ -32,4 +32,7 @@ Outputs_*
*_env/*
*_env/*
# Ignore test results
# Ignore test results
.coverage*
.coverage*
\ No newline at end of file
# Ignore files for vscode
.vscode/*
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/bayesvalidrox/post_processing/post_processing.py
+
149
−
137
View file @
0ab15fe8
This diff is collapsed.
Click to expand it.
tests/test_PostProcessing.py
+
5
−
4
View file @
0ab15fe8
...
@@ -158,16 +158,16 @@ def test_check_reg_quality_pce(pce_engine) -> None:
...
@@ -158,16 +158,16 @@ def test_check_reg_quality_pce(pce_engine) -> None:
post
=
PostProcessing
(
engine
)
post
=
PostProcessing
(
engine
)
post
.
check_reg_quality
(
samples
=
engine
.
ExpDesign
.
X
,
outputs
=
engine
.
ExpDesign
.
Y
)
post
.
check_reg_quality
(
samples
=
engine
.
ExpDesign
.
X
,
outputs
=
engine
.
ExpDesign
.
Y
)
#%% e
val_pce_
model_3d
#%% e
plot_meta
model_3d
def
test_
eval_pce_
model_3d_nopce
(
basic_engine
)
->
None
:
def
test_
plot_meta
model_3d_nopce
(
basic_engine
)
->
None
:
"""
"""
3d eval of non-PCE metamodel
3d eval of non-PCE metamodel
"""
"""
engine
=
basic_engine
engine
=
basic_engine
post
=
PostProcessing
(
engine
)
post
=
PostProcessing
(
engine
)
with
pytest
.
raises
(
AttributeError
)
as
excinfo
:
with
pytest
.
raises
(
AttributeError
)
as
excinfo
:
post
.
eval_pce_
model_3d
()
post
.
plot_meta
model_3d
()
assert
str
(
excinfo
.
value
)
==
'
This evaluation only support PCE-type models!
'
assert
str
(
excinfo
.
value
)
==
'
This evaluation only support PCE-type models!
'
...
@@ -180,9 +180,10 @@ def test_plot_validation_nopce(basic_engine) -> None:
...
@@ -180,9 +180,10 @@ def test_plot_validation_nopce(basic_engine) -> None:
Plot validation of non-PCE metamodel
Plot validation of non-PCE metamodel
"""
"""
engine
=
basic_engine
engine
=
basic_engine
samples
=
engine
.
ExpDesign
.
generate_samples
(
10
,
'
random
'
)
post
=
PostProcessing
(
engine
)
post
=
PostProcessing
(
engine
)
with
pytest
.
raises
(
AttributeError
)
as
excinfo
:
with
pytest
.
raises
(
AttributeError
)
as
excinfo
:
post
.
_plot_validation
()
post
.
_plot_validation
(
samples
)
assert
str
(
excinfo
.
value
)
==
'
This evaluation only support PCE-type models!
'
assert
str
(
excinfo
.
value
)
==
'
This evaluation only support PCE-type models!
'
#%% _plot_validation_multi
#%% _plot_validation_multi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment