Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.pad.base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.pad.base
Commits
3e83cf9a
Commit
3e83cf9a
authored
May 28, 2018
by
Amir MOHAMMADI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle nans in sorting more properly
parent
37726f48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
bob/pad/base/script/cross.py
bob/pad/base/script/cross.py
+8
-9
No files found.
bob/pad/base/script/cross.py
View file @
3e83cf9a
"""Prints Cross-db metrics analysis
"""
import
os
import
click
import
jinja2
import
logging
import
math
import
os
import
yaml
import
jinja2
from
tabulate
import
tabulate
from
bob.bio.base.score.load
import
split
from
bob.extension.scripts.click_helper
import
verbosity_option
,
bool_option
from
bob.measure
import
eer_threshold
,
farfrr
from
bob.measure.script
import
common_options
from
bob.measure.utils
import
get_fta
from
bob.extension.scripts.click_helper
import
verbosity_option
,
bool_option
from
bob.bio.base.score.load
import
split
from
gridtk.generator
import
expand
from
tabulate
import
tabulate
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -102,10 +103,8 @@ def cross(ctx, score_jinja_template, databases, protocols, algorithms,
def
sort_key
(
alg
):
r
=
[]
for
grp
in
(
'eval'
,
'dev'
,
'train'
):
hter
=
metrics
.
get
(
(
train_database
,
train_protocol
,
alg
,
group
))
hter
=
hter
if
hter
is
None
else
hter
[
0
]
r
.
append
(
hter
)
hter
=
metrics
[(
train_database
,
train_protocol
,
alg
,
group
)][
0
]
r
.
append
(
1
if
math
.
isnan
(
hter
)
else
hter
)
return
tuple
(
r
)
algorithms
=
sorted
(
algorithms
,
key
=
sort_key
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment