Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.pad.base
Commits
463f1d17
Commit
463f1d17
authored
Jun 04, 2018
by
Theophile GENTILHOMME
Browse files
[script][figure] Change vuln labels for det
parent
22047462
Pipeline
#20713
failed with stage
in 29 minutes and 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/base/script/figure.py
View file @
463f1d17
...
...
@@ -111,9 +111,9 @@ class MetricsVuln(measure_figure.Metrics):
headers
=
[
''
or
title
,
'%s (threshold=%.2g)'
%
(
criter
.
upper
(),
threshold
)]
rows
=
[]
rows
.
append
([
'
APCE
R (%)'
,
'{:>5.1f}%'
.
format
(
100
*
far
)])
rows
.
append
([
'
BPCE
R (%)'
,
'{:>5.1f}%'
.
format
(
frr
*
100
)])
rows
.
append
([
'
AC
ER (%)'
,
'{:>5.1f}%'
.
format
(
50
*
(
far
+
frr
))])
rows
.
append
([
'
FM
R (%)'
,
'{:>5.1f}%'
.
format
(
100
*
far
)])
rows
.
append
([
'
FNM
R (%)'
,
'{:>5.1f}%'
.
format
(
frr
*
100
)])
rows
.
append
([
'
HT
ER (%)'
,
'{:>5.1f}%'
.
format
(
50
*
(
far
+
frr
))])
rows
.
append
([
'IAPMR (%)'
,
'{:>5.1f}%'
.
format
(
100
*
iapmr
)])
click
.
echo
(
tabulate
(
rows
,
headers
,
self
.
_tablefmt
),
...
...
@@ -643,7 +643,7 @@ class BaseDetRoc(PadPlot):
xytext
=
(
xyannotate_spoof
[
0
],
xyannotate_spoof
[
1
]))
else
:
mpl
.
annotate
(
'
APCE
R=%.2f%%'
%
(
farfrr_licit
[
0
]
*
100
),
'
FM
R=%.2f%%'
%
(
farfrr_licit
[
0
]
*
100
),
xy
=
(
farfrr_licit_det
[
0
],
farfrr_licit_det
[
1
]),
xycoords
=
'data'
,
xytext
=
(
xyannotate_licit
[
0
],
xyannotate_licit
[
1
]),
...
...
@@ -692,14 +692,14 @@ class BaseDetRoc(PadPlot):
pass
class
Det
(
BaseDetRoc
):
'''
Base
for
DET and ROC
'''
'''
DET
for
vuln
'''
def
__init__
(
self
,
ctx
,
scores
,
evaluation
,
func_load
,
criteria
,
real_data
,
no_spoof
):
super
(
Det
,
self
).
__init__
(
ctx
,
scores
,
evaluation
,
func_load
,
criteria
,
real_data
,
no_spoof
)
self
.
_x_label
=
self
.
_x_label
or
"
APCE
R"
self
.
_y_label
=
self
.
_y_label
or
"
BPCE
R"
self
.
_x_label
=
self
.
_x_label
or
"
FM
R"
self
.
_y_label
=
self
.
_y_label
or
"
FNM
R"
add
=
''
if
not
self
.
_no_spoof
:
add
=
" and overlaid SPOOF scenario"
...
...
@@ -733,8 +733,8 @@ class RocVuln(BaseDetRoc):
no_spoof
):
super
(
RocVuln
,
self
).
__init__
(
ctx
,
scores
,
evaluation
,
func_load
,
criteria
,
real_data
,
no_spoof
)
self
.
_x_label
=
self
.
_x_label
or
"
APCE
R"
self
.
_y_label
=
self
.
_y_label
or
"1 -
BPCE
R"
self
.
_x_label
=
self
.
_x_label
or
"
FM
R"
self
.
_y_label
=
self
.
_y_label
or
"1 -
FNM
R"
self
.
_semilogx
=
ctx
.
meta
.
get
(
'semilogx'
,
True
)
add
=
''
if
not
self
.
_no_spoof
:
...
...
@@ -793,7 +793,7 @@ class FmrIapmr(PadPlot):
title
=
self
.
_title
if
self
.
_title
is
not
None
else
"FMR vs IAPMR"
if
title
.
replace
(
' '
,
''
):
mpl
.
title
(
title
)
mpl
.
xlabel
(
self
.
_x_label
or
"F
alse Match Rate
(%)"
)
mpl
.
xlabel
(
self
.
_x_label
or
"F
MR
(%)"
)
mpl
.
ylabel
(
self
.
_y_label
or
"IAPMR (%)"
)
mpl
.
grid
(
True
,
color
=
self
.
_grid_color
)
if
self
.
_disp_legend
:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment