Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pes_to_spec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Machine Learning projects.
pes_to_spec
Commits
607306ae
Commit
607306ae
authored
1 year ago
by
Danilo Ferreira de Lima
Browse files
Options
Downloads
Patches
Plain Diff
Added plot of the residuals correlation.
parent
9bb04ca5
No related branches found
No related tags found
1 merge request
!14
Corrected bugs in the BNN and added many plotting scripts adapted for the paper
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pes_to_spec/test/prepare_plots.py
+14
-1
14 additions, 1 deletion
pes_to_spec/test/prepare_plots.py
with
14 additions
and
1 deletion
pes_to_spec/test/prepare_plots.py
+
14
−
1
View file @
607306ae
...
...
@@ -10,7 +10,6 @@ import numpy as np
import
matplotlib.pyplot
as
plt
from
matplotlib.gridspec
import
GridSpec
import
seaborn
as
sns
from
scipy.interpolate
import
make_interp_spline
,
BSpline
SMALL_SIZE
=
12
MEDIUM_SIZE
=
18
...
...
@@ -102,6 +101,19 @@ def plot_residue(df: pd.DataFrame, filename: str):
fig
.
savefig
(
filename
)
plt
.
close
(
fig
)
def
plot_residue_corr
(
df
:
pd
.
DataFrame
,
filename
:
str
):
cols
=
[
k
for
k
in
df
.
columns
if
"
res_prepca
"
in
k
]
df_res
=
df
.
loc
[:,
cols
]
df_res
.
columns
=
[
re
.
match
(
r
"
res_prepca_([0-9]*)
"
,
k
).
groups
()[
0
]
for
k
in
df_res
.
columns
]
fig
=
plt
.
figure
(
figsize
=
(
8
,
8
))
corr
=
df_res
.
corr
()
mask
=
np
.
triu
(
np
.
ones_like
(
corr
,
dtype
=
bool
))
cmap
=
sns
.
diverging_palette
(
230
,
20
,
as_cmap
=
True
)
sns
.
heatmap
(
corr
,
mask
=
mask
,
cmap
=
cmap
,
center
=
0
,
square
=
True
,
linewidths
=
0.5
,
vmin
=-
1
,
vmax
=
1
)
fig
.
savefig
(
filename
)
plt
.
close
(
fig
)
def
plot_chi2_intensity
(
df
:
pd
.
DataFrame
,
filename
:
str
):
fig
=
plt
.
figure
(
figsize
=
(
12
,
8
))
gs
=
GridSpec
(
1
,
1
)
...
...
@@ -286,6 +298,7 @@ if __name__ == '__main__':
plot_rmse_intensity
(
pd
.
read_csv
(
f
'
{
indir
}
/quality.csv
'
),
f
'
intensity_vs_rmse.pdf
'
)
plot_residue
(
pd
.
read_csv
(
f
'
{
indir
}
/quality.csv
'
),
f
'
residue.pdf
'
)
plot_residue_corr
(
pd
.
read_csv
(
f
'
{
indir
}
/quality.csv
'
),
f
'
residue_corr.pdf
'
)
df_model
=
pd
.
read_csv
(
f
'
{
indir
}
/model.csv
'
)
df_model
.
impulse
=
df_model
.
impulse
.
str
.
replace
(
'
i
'
,
'
j
'
).
apply
(
lambda
x
:
np
.
complex
(
x
))
...
...
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