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
c242aa50
Commit
c242aa50
authored
3 months ago
by
Alina Lacheim
Browse files
Options
Downloads
Patches
Plain Diff
delted test for seq_design
parent
bc40723e
No related branches found
No related tags found
1 merge request
!37
Fix/post processing
Pipeline
#52577
failed
3 months ago
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_PostProcessing.py
+2
-13
2 additions, 13 deletions
tests/test_PostProcessing.py
with
2 additions
and
13 deletions
tests/test_PostProcessing.py
+
2
−
13
View file @
c242aa50
...
@@ -23,7 +23,6 @@ import os
...
@@ -23,7 +23,6 @@ import os
from
bayesvalidrox.post_processing.post_processing
import
PostProcessing
from
bayesvalidrox.post_processing.post_processing
import
PostProcessing
from
bayesvalidrox.surrogate_models.inputs
import
Input
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.exp_designs
import
ExpDesigns
from
bayesvalidrox.surrogate_models.surrogate_models
import
MetaModel
from
bayesvalidrox.surrogate_models.surrogate_models
import
MetaModel
from
bayesvalidrox.surrogate_models.polynomial_chaos
import
PCE
from
bayesvalidrox.surrogate_models.polynomial_chaos
import
PCE
...
@@ -62,7 +61,6 @@ def basic_engine_trained():
...
@@ -62,7 +61,6 @@ def basic_engine_trained():
engine
.
MetaModel
=
mm
engine
.
MetaModel
=
mm
# Set up sequential design diagnostics data
# 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
.
SeqModifiedLOO
=
{
'
Z
'
:
np
.
array
([
0.1
,
0.2
,
0.3
])}
engine
.
seqValidError
=
{
'
Z
'
:
np
.
array
([
0.15
,
0.25
,
0.35
])}
engine
.
seqValidError
=
{
'
Z
'
:
np
.
array
([
0.15
,
0.25
,
0.35
])}
engine
.
SeqKLD
=
{
'
Z
'
:
np
.
array
([
0.05
,
0.1
,
0.15
])}
engine
.
SeqKLD
=
{
'
Z
'
:
np
.
array
([
0.05
,
0.1
,
0.15
])}
...
@@ -128,6 +126,7 @@ def basic_engine_sequential():
...
@@ -128,6 +126,7 @@ def basic_engine_sequential():
@pytest.fixture
@pytest.fixture
def
pce_engine
():
def
pce_engine
():
inp
=
Input
()
inp
=
Input
()
inp
.
add_marginals
()
inp
.
add_marginals
()
inp
.
Marginals
[
0
].
name
=
'
x
'
inp
.
Marginals
[
0
].
name
=
'
x
'
inp
.
Marginals
[
0
].
dist_type
=
'
normal
'
inp
.
Marginals
[
0
].
dist_type
=
'
normal
'
...
@@ -200,7 +199,7 @@ def gpe_engine():
...
@@ -200,7 +199,7 @@ def gpe_engine():
inp
.
Marginals
[
0
].
parameters
=
[
0
,
1
]
inp
.
Marginals
[
0
].
parameters
=
[
0
,
1
]
expdes
=
ExpDesigns
(
inp
)
expdes
=
ExpDesigns
(
inp
)
expdes
.
init_param_space
(
max_deg
=
1
)
expdes
.
init_param_space
()
expdes
.
X
=
np
.
array
([[
0
],
[
1
],
[
0.5
]])
expdes
.
X
=
np
.
array
([[
0
],
[
1
],
[
0.5
]])
expdes
.
Y
=
{
'
Z
'
:
[[
0.4
],
[
0.5
],
[
0.45
]]}
expdes
.
Y
=
{
'
Z
'
:
[[
0.4
],
[
0.5
],
[
0.45
]]}
expdes
.
x_values
=
[
0
]
expdes
.
x_values
=
[
0
]
...
@@ -397,16 +396,6 @@ def test_check_reg_quality_gpe(gpe_engine) -> None:
...
@@ -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
)
post
.
check_reg_quality
(
samples
=
engine
.
ExpDesign
.
X
,
outputs
=
engine
.
ExpDesign
.
Y
)
# Add assertions to check the quality metrics if available
# 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
#%% plot_metamodel_3d
def
test_plot_metamodel_3d_pce
(
pce_engine_3d_plot
)
->
None
:
def
test_plot_metamodel_3d_pce
(
pce_engine_3d_plot
)
->
None
:
"""
"""
...
...
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