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
f0a055df
Commit
f0a055df
authored
4 months ago
by
kohlhaasrebecca
Browse files
Options
Downloads
Patches
Plain Diff
Small changes and tests
parent
8fa874ce
No related branches found
No related tags found
1 merge request
!37
Fix/post processing
Pipeline
#51966
failed
4 months ago
Stage: test
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/bayesvalidrox/post_processing/post_processing.py
+1
-1
1 addition, 1 deletion
src/bayesvalidrox/post_processing/post_processing.py
tests/test_PostProcessing.py
+19
-0
19 additions, 0 deletions
tests/test_PostProcessing.py
with
20 additions
and
1 deletion
src/bayesvalidrox/post_processing/post_processing.py
+
1
−
1
View file @
f0a055df
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_PostProcessing.py
+
19
−
0
View file @
f0a055df
...
@@ -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
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