Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.base
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
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
bob
bob.bio.base
Commits
aab5ca5d
Commit
aab5ca5d
authored
6 years ago
by
Saeed SARFJOO
Browse files
Options
Downloads
Patches
Plain Diff
Compute the norm minDCF and fix the floating-point precision
parent
a314bad8
No related branches found
No related tags found
1 merge request
!173
WIP: Compute the norm minDCF and fix the floating-point precision
Pipeline
#24151
passed
6 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/bio/base/script/figure.py
+10
-12
10 additions, 12 deletions
bob/bio/base/script/figure.py
with
10 additions
and
12 deletions
bob/bio/base/script/figure.py
+
10
−
12
View file @
aab5ca5d
...
@@ -175,10 +175,9 @@ class Metrics(measure_figure.Metrics):
...
@@ -175,10 +175,9 @@ class Metrics(measure_figure.Metrics):
far
,
frr
=
bob
.
measure
.
farfrr
(
far
,
frr
=
bob
.
measure
.
farfrr
(
input_scores
[
0
][
0
],
input_scores
[
0
][
1
],
threshold
input_scores
[
0
][
0
],
input_scores
[
0
][
1
],
threshold
)
)
dev_far_str
=
"
%.1f%%
"
%
(
100
*
far
)
dev_far_str
=
"
%.2f%%
"
%
(
100
*
far
)
dev_frr_str
=
"
%.1f%%
"
%
(
100
*
frr
)
dev_frr_str
=
"
%.2f%%
"
%
(
100
*
frr
)
dev_mindcf_str
=
"
%.1f%%
"
%
(
dev_mindcf_str
=
"
%.4f
"
%
((
cost
/
(
1
-
cost
))
*
far
+
frr
)
(
cost
*
far
+
(
1
-
cost
)
*
frr
)
*
100.
)
raws
=
[[
'
FAR
'
,
dev_far_str
],
raws
=
[[
'
FAR
'
,
dev_far_str
],
[
'
FRR
'
,
dev_frr_str
],
[
'
FRR
'
,
dev_frr_str
],
[
'
minDCF
'
,
dev_mindcf_str
]]
[
'
minDCF
'
,
dev_mindcf_str
]]
...
@@ -187,10 +186,9 @@ class Metrics(measure_figure.Metrics):
...
@@ -187,10 +186,9 @@ class Metrics(measure_figure.Metrics):
far
,
frr
=
bob
.
measure
.
farfrr
(
far
,
frr
=
bob
.
measure
.
farfrr
(
input_scores
[
1
][
0
],
input_scores
[
1
][
1
],
threshold
input_scores
[
1
][
0
],
input_scores
[
1
][
1
],
threshold
)
)
eval_far_str
=
"
%.1f%%
"
%
(
100
*
far
)
eval_far_str
=
"
%.2f%%
"
%
(
100
*
far
)
eval_frr_str
=
"
%.1f%%
"
%
(
100
*
frr
)
eval_frr_str
=
"
%.2f%%
"
%
(
100
*
frr
)
eval_mindcf_str
=
"
%.1f%%
"
%
(
eval_mindcf_str
=
"
%.4f
"
%
((
cost
/
(
1
-
cost
))
*
far
+
frr
)
(
cost
*
far
+
(
1
-
cost
)
*
frr
)
*
100.
)
raws
[
0
].
append
(
eval_far_str
)
raws
[
0
].
append
(
eval_far_str
)
raws
[
1
].
append
(
eval_frr_str
)
raws
[
1
].
append
(
eval_frr_str
)
raws
[
2
].
append
(
eval_mindcf_str
)
raws
[
2
].
append
(
eval_mindcf_str
)
...
@@ -203,8 +201,8 @@ class Metrics(measure_figure.Metrics):
...
@@ -203,8 +201,8 @@ class Metrics(measure_figure.Metrics):
min_cllr
=
bob
.
measure
.
calibration
.
min_cllr
(
min_cllr
=
bob
.
measure
.
calibration
.
min_cllr
(
input_scores
[
0
][
0
],
input_scores
[
0
][
1
]
input_scores
[
0
][
0
],
input_scores
[
0
][
1
]
)
)
dev_cllr_str
=
"
%.
1f%%
"
%
cllr
dev_cllr_str
=
"
%.
4f
"
%
cllr
dev_min_cllr_str
=
"
%.
1f%%
"
%
min_cllr
dev_min_cllr_str
=
"
%.
4f
"
%
min_cllr
raws
=
[[
'
Cllr
'
,
dev_cllr_str
],
raws
=
[[
'
Cllr
'
,
dev_cllr_str
],
[
'
minCllr
'
,
dev_min_cllr_str
]]
[
'
minCllr
'
,
dev_min_cllr_str
]]
if
self
.
_eval
and
input_scores
[
1
]
is
not
None
:
if
self
.
_eval
and
input_scores
[
1
]
is
not
None
:
...
@@ -213,8 +211,8 @@ class Metrics(measure_figure.Metrics):
...
@@ -213,8 +211,8 @@ class Metrics(measure_figure.Metrics):
min_cllr
=
bob
.
measure
.
calibration
.
min_cllr
(
min_cllr
=
bob
.
measure
.
calibration
.
min_cllr
(
input_scores
[
1
][
0
],
input_scores
[
1
][
1
]
input_scores
[
1
][
0
],
input_scores
[
1
][
1
]
)
)
eval_cllr_str
=
"
%.
1f%%
"
%
cllr
eval_cllr_str
=
"
%.
4f
"
%
cllr
eval_min_cllr_str
=
"
%.
1f%%
"
%
min_cllr
eval_min_cllr_str
=
"
%.
4f
"
%
min_cllr
raws
[
0
].
append
(
eval_cllr_str
)
raws
[
0
].
append
(
eval_cllr_str
)
raws
[
1
].
append
(
eval_min_cllr_str
)
raws
[
1
].
append
(
eval_min_cllr_str
)
click
.
echo
(
click
.
echo
(
...
...
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