Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
baseLess
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lannoy, Carlos de
baseLess
Commits
9f44976b
Commit
9f44976b
authored
3 years ago
by
Noordijk, Ben
Browse files
Options
Downloads
Patches
Plain Diff
Hots hots, better plots
parent
9cbec9d2
No related branches found
Branches containing commit
No related tags found
1 merge request
!3
Added data preparation, hyperparameter optimisation, benchmarking code and k-mer library visualisation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
compare_benchmark_performance/compare_accuracy.py
+12
-4
12 additions, 4 deletions
compare_benchmark_performance/compare_accuracy.py
with
12 additions
and
4 deletions
compare_benchmark_performance/compare_accuracy.py
+
12
−
4
View file @
9f44976b
import
pandas
as
pd
import
argparse
from
pathlib
import
Path
from
itertools
import
chain
from
multiprocessing
import
Pool
import
pandas
as
pd
from
sklearn.metrics
import
ConfusionMatrixDisplay
,
f1_score
,
accuracy_score
import
matplotlib.pyplot
as
plt
import
seaborn
as
sns
...
...
@@ -121,21 +123,27 @@ def main():
df
=
pd
.
DataFrame
.
from_records
(
all_records
,
columns
=
[
'
tool
'
,
'
species
'
,
'
fold
'
,
'
accuracy
'
,
'
f1
'
])
# Set species in alphabetical order
all_species
=
df
.
species
.
unique
()
all_species
.
sort
()
# Do basic plotting
df
.
groupby
([
'
species
'
,
'
tool
'
]).
mean
().
plot
.
bar
()
plt
.
tight_layout
()
plt
.
show
()
sns
.
catplot
(
x
=
'
species
'
,
y
=
'
accuracy
'
,
ci
=
'
sd
'
,
data
=
df
,
hue
=
'
tool
'
,
kind
=
'
bar
'
,
legend_out
=
True
)
sns
.
catplot
(
x
=
'
species
'
,
y
=
'
accuracy
'
,
ci
=
'
sd
'
,
data
=
df
,
hue
=
'
tool
'
,
kind
=
'
bar
'
,
order
=
all_species
,
legend_out
=
False
,
aspect
=
2
,
palette
=
'
pastel
'
)
plt
.
xticks
(
rotation
=
90
)
plt
.
tight_layout
()
plt
.
show
()
sns
.
catplot
(
x
=
'
species
'
,
y
=
'
f1
'
,
data
=
df
,
hue
=
'
tool
'
,
kind
=
'
bar
'
)
sns
.
catplot
(
x
=
'
species
'
,
y
=
'
f1
'
,
ci
=
'
sd
'
,
data
=
df
,
hue
=
'
tool
'
,
kind
=
'
bar
'
,
order
=
all_species
,
legend_out
=
False
,
aspect
=
2
)
plt
.
xticks
(
rotation
=
90
)
plt
.
tight_layout
()
plt
.
show
()
if
__name__
==
'
__main__
'
:
main
()
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