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
d37a25cc
Commit
d37a25cc
authored
3 months ago
by
kohlhaasrebecca
Browse files
Options
Downloads
Patches
Plain Diff
Fix test
parent
bc40723e
No related branches found
No related tags found
1 merge request
!37
Fix/post processing
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/bayesvalidrox/post_processing/post_processing.py
+5
-4
5 additions, 4 deletions
src/bayesvalidrox/post_processing/post_processing.py
with
5 additions
and
4 deletions
src/bayesvalidrox/post_processing/post_processing.py
+
5
−
4
View file @
d37a25cc
...
...
@@ -844,11 +844,11 @@ class PostProcessing:
y_val
=
outputs
if
y_val
is
None
:
y_val
,
_
=
self
.
engine
.
Model
.
run_model_parallel
(
samples
,
key_str
=
"
valid
"
)
y_
pce
_val
,
_
=
self
.
engine
.
eval_metamodel
(
samples
=
samples
)
y_
metamod
_val
,
_
=
self
.
engine
.
eval_metamodel
(
samples
=
samples
)
# Fit the data(train the model)
for
key
in
y_
pce
_val
.
keys
():
residuals
=
y_val
[
key
]
-
y_
pce
_val
[
key
]
for
key
in
y_
metamod
_val
.
keys
():
residuals
=
y_val
[
key
]
-
y_
metamod
_val
[
key
]
# ------ Residuals vs. predicting variables ------
# Check the assumptions of linearity and independence
...
...
@@ -874,7 +874,8 @@ class PostProcessing:
# ------ Fitted vs. residuals ------
# Check the assumptions of linearity and independence
plt
.
scatter
(
x
=
y_pce_val
[
key
],
y
=
residuals
,
color
=
"
blue
"
,
edgecolor
=
"
k
"
)
for
i
in
range
(
y_metamod_val
[
key
].
shape
[
0
]):
plt
.
scatter
(
x
=
y_metamod_val
[
key
][
i
,:],
y
=
residuals
[
i
,:],
color
=
"
blue
"
,
edgecolor
=
"
k
"
)
plt
.
title
(
f
"
{
key
}
: Residuals vs. fitted values
"
)
plt
.
grid
(
True
)
plt
.
hlines
(
...
...
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