Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
f0_estimation
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
Container 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Best
f0_estimation
Commits
24614437
Commit
24614437
authored
1 year ago
by
Paul Best
Browse files
Options
Downloads
Patches
Plain Diff
better plot scores
parent
062ea49d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
plot_scores.py
+12
-10
12 additions, 10 deletions
plot_scores.py
with
12 additions
and
10 deletions
plot_scores.py
+
12
−
10
View file @
24614437
...
...
@@ -2,14 +2,14 @@ import matplotlib.pyplot as plt
import
pandas
as
pd
,
numpy
as
np
from
metadata
import
species
algos
=
[
'
praat
'
,
'
pyin
'
,
'
crepe
'
,
'
tcrepe
'
,
'
tcrepe_ft
'
,
'
tcrepe_ft
sp
'
,
'
basic
'
,
'
pesto
'
]
metrics
=
[
'
threshold
'
,
'
Recall
'
,
'
False alarm
'
,
'
Pitch acc
'
,
'
Chroma acc
'
]
algos
=
[
'
praat
'
,
'
tcrepe_ft
sp
'
,
'
tcrepe_ft
oth
'
,
'
basic
'
,
'
pesto
'
,
'
pesto_ft
'
]
metrics
=
[
'
Recall
'
,
'
False alarm
'
,
'
Pitch acc
'
,
'
Chroma acc
'
]
drop_noisy_bins
=
Tru
e
drop_noisy_bins
=
Fals
e
drop_noisy_vocs
=
False
fig
,
ax
=
plt
.
subplots
(
nrows
=
len
(
metrics
)
,
figsize
=
(
7
,
1
5
),
sharex
=
True
,
sharey
=
True
)
ax
[
0
].
set_ylim
(
0
,
1
)
fig
,
ax
=
plt
.
subplots
(
nrows
=
2
,
ncols
=
2
,
figsize
=
(
10
,
1
0
),
sharex
=
True
,
sharey
=
True
)
ax
[
0
,
0
].
set_ylim
(
0
,
1
)
for
i
,
metric
in
enumerate
(
metrics
):
ok
=
pd
.
DataFrame
()
...
...
@@ -17,11 +17,13 @@ for i, metric in enumerate(metrics):
df
=
pd
.
read_csv
(
f
'
scores/
{
specie
}
_scores
{
"
_minusvocs
"
if
drop_noisy_vocs
else
""
}{
"
_minusbins
"
if
drop_noisy_bins
else
""
}
.csv
'
,
index_col
=
0
)
df
[
'
False alarm
'
]
=
1
-
df
[
'
False alarm
'
]
ok
.
loc
[
specie
,
df
.
index
]
=
df
[
metric
]
ok
=
ok
.
loc
[:,
algos
]
ok
=
ok
[
algos
]
# bar plot
ok
.
plot
.
bar
(
rot
=
22
,
ax
=
ax
[
i
])
ax
[
i
].
legend
(
bbox_to_anchor
=
(
1
,
1
))
ax
[
i
].
grid
()
ax
[
i
].
set_title
(
metric
)
m_ax
=
ax
[
int
(
i
//
2
),
i
%
2
]
ok
.
plot
.
barh
(
ax
=
m_ax
,
legend
=
None
)
m_ax
.
grid
()
m_ax
.
set_title
(
metric
)
if
i
%
2
==
1
:
m_ax
.
legend
(
bbox_to_anchor
=
(
1
,
1
))
plt
.
tight_layout
()
plt
.
savefig
(
f
'
scores
{
"
_minusvocs
"
if
drop_noisy_vocs
else
""
}{
"
_minusbins
"
if
drop_noisy_bins
else
""
}
.pdf
'
)
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