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
b477a5df
Commit
b477a5df
authored
5 months ago
by
kohlhaasrebecca
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Add output-option to check_reg_quality
Also added related PCE-tests
parent
deccca7f
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
+8
-4
8 additions, 4 deletions
src/bayesvalidrox/post_processing/post_processing.py
with
8 additions
and
4 deletions
src/bayesvalidrox/post_processing/post_processing.py
+
8
−
4
View file @
b477a5df
...
@@ -846,13 +846,10 @@ class PostProcessing:
...
@@ -846,13 +846,10 @@ class PostProcessing:
# -------------------------------------------------------------------------
# -------------------------------------------------------------------------
def
check_reg_quality
(
self
,
n_samples
:
int
=
1000
,
samples
=
None
,
outputs
:
dict
=
None
)
->
None
:
def
check_reg_quality
(
self
,
n_samples
:
int
=
1000
,
samples
=
None
,
outputs
:
dict
=
None
)
->
None
:
"""
"""
"""
"""
Checks the quality of the metamodel for single output models based on:
Checks the quality of the metamodel for single output models based on:
https://towardsdatascience.com/how-do-you-check-the-quality-of-your-regression-model-in-python-fa61759ff685
https://towardsdatascience.com/how-do-you-check-the-quality-of-your-regression-model-in-python-fa61759ff685
Parameters
Parameters
----------
----------
n_samples : int, optional
n_samples : int, optional
...
@@ -863,6 +860,10 @@ class PostProcessing:
...
@@ -863,6 +860,10 @@ class PostProcessing:
Output dictionary with model outputs for all given output types in
Output dictionary with model outputs for all given output types in
`Model.Output.names`. The default is None.
`Model.Output.names`. The default is None.
Return
------
None
"""
"""
if
samples
is
None
:
if
samples
is
None
:
self
.
n_samples
=
n_samples
self
.
n_samples
=
n_samples
...
@@ -871,7 +872,10 @@ class PostProcessing:
...
@@ -871,7 +872,10 @@ class PostProcessing:
self
.
n_samples
=
samples
.
shape
[
0
]
self
.
n_samples
=
samples
.
shape
[
0
]
# Evaluate the original and the surrogate model
# Evaluate the original and the surrogate model
y_val
=
self
.
_eval_model
(
samples
,
key_str
=
'
valid
'
)
if
outputs
is
None
:
y_val
=
self
.
_eval_model
(
samples
,
key_str
=
'
valid
'
)
else
:
y_val
=
outputs
y_pce_val
,
_
=
self
.
engine
.
eval_metamodel
(
samples
=
samples
)
y_pce_val
,
_
=
self
.
engine
.
eval_metamodel
(
samples
=
samples
)
# Open a pdf for the plots
# Open a pdf for the plots
...
...
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