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
9c27b0fe
Commit
9c27b0fe
authored
3 months ago
by
kohlhaasrebecca
Browse files
Options
Downloads
Patches
Plain Diff
Add deprecation warning for PostProcessing._plot_validation
parent
6a70f663
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
+14
-16
14 additions, 16 deletions
src/bayesvalidrox/post_processing/post_processing.py
with
14 additions
and
16 deletions
src/bayesvalidrox/post_processing/post_processing.py
+
14
−
16
View file @
9c27b0fe
...
...
@@ -5,6 +5,7 @@ Collection of postprocessing functions into a class.
"""
import
os
import
warnings
from
itertools
import
combinations
,
cycle
import
numpy
as
np
import
pandas
as
pd
...
...
@@ -216,15 +217,17 @@ class PostProcessing:
"""
if
samples
is
None
:
samples
=
self
.
engine
.
ExpDesign
.
generate_samples
(
n_samples
,
sampling_method
=
"
random
"
)
n_samples
,
sampling_method
=
"
random
"
)
else
:
n_samples
=
samples
.
shape
[
0
]
if
model_out_dict
is
not
None
:
self
.
model_out_dict
=
model_out_dict
else
:
self
.
model_out_dict
,
_
=
self
.
engine
.
Model
.
run_model_parallel
(
samples
,
key_str
=
"
valid
"
)
self
.
model_out_dict
,
_
=
self
.
engine
.
Model
.
run_model_parallel
(
samples
,
key_str
=
"
valid
"
)
self
.
pce_out_mean
,
self
.
pce_out_std
=
self
.
engine
.
eval_metamodel
(
samples
)
self
.
_plot_validation_multi
()
...
...
@@ -276,8 +279,8 @@ class PostProcessing:
# Generate random samples if necessary
if
samples
is
None
:
samples
=
self
.
engine
.
ExpDesign
.
generate_samples
(
n_samples
,
sampling_method
=
"
random
"
)
n_samples
,
sampling_method
=
"
random
"
)
# Run the original model with the generated samples
if
outputs
is
None
:
...
...
@@ -826,8 +829,8 @@ class PostProcessing:
"""
if
samples
is
None
:
samples
=
self
.
engine
.
ExpDesign
.
generate_samples
(
n_samples
,
sampling_method
=
"
random
"
)
n_samples
,
sampling_method
=
"
random
"
)
else
:
n_samples
=
samples
.
shape
[
0
]
...
...
@@ -991,6 +994,10 @@ class PostProcessing:
None.
"""
warnings
.
warn
(
"
This function will be deprecated in the future! Use PostProcessing._plot_validation_multi() instead!
"
,
DeprecationWarning
,
)
# This function currently only supports PCE/aPCE
metamod
=
self
.
engine
.
MetaModel
if
not
hasattr
(
metamod
,
"
meta_model_type
"
):
...
...
@@ -1035,19 +1042,14 @@ class PostProcessing:
xy
=
(
0.05
,
0.85
),
xycoords
=
"
axes fraction
"
,
)
plt
.
ylabel
(
"
Original Model
"
)
plt
.
xlabel
(
"
PCE Model
"
)
plt
.
grid
()
# save the current figure
plot_name
=
key
.
replace
(
"
"
,
"
_
"
)
fig
.
savefig
(
f
"
./
{
self
.
out_dir
}
/Model_vs_PCEModel_
{
plot_name
}
.
{
self
.
out_format
}
"
,
bbox_inches
=
"
tight
"
,
)
# Destroy the current plot
plt
.
close
()
# -------------------------------------------------------------------------
...
...
@@ -1067,10 +1069,6 @@ class PostProcessing:
------
AttributeError: This evaluation only support PCE-type models!
Raises
------
AttributeError: This evaluation only support PCE-type models!
Returns
-------
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