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
69bd13ce
Commit
69bd13ce
authored
Jun 24, 2019
by
Amir MOHAMMADI
Browse files
Use plot.roc instead of plot.roc_for_far in vulnerability ROC plots
parent
bed08162
Pipeline
#31340
passed with stage
in 16 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/base/script/vuln_figure.py
View file @
69bd13ce
...
...
@@ -435,6 +435,7 @@ class BaseVulnDetRoc(VulnPlot):
self
.
_fnmrs_at
=
ctx
.
meta
.
get
(
'fnmr'
,
[])
self
.
_real_data
=
True
if
real_data
is
None
else
real_data
self
.
_legend_loc
=
None
self
.
_min_dig
=
-
4
if
self
.
_min_dig
is
None
else
self
.
_min_dig
def
compute
(
self
,
idx
,
input_scores
,
input_names
):
''' Implements plots'''
...
...
@@ -626,12 +627,14 @@ class RocVuln(BaseVulnDetRoc):
def
_plot
(
self
,
x
,
y
,
points
,
**
kwargs
):
LOGGER
.
info
(
"Plot ROC"
)
plot
.
roc
_for_far
(
plot
.
roc
(
x
,
y
,
far_values
=
plot
.
log_values
(
self
.
_min_dig
or
-
4
)
,
npoints
=
self
.
_points
,
CAR
=
self
.
_semilogx
,
color
=
kwargs
.
get
(
'color'
),
linestyle
=
kwargs
.
get
(
'linestyle'
),
label
=
kwargs
.
get
(
'label'
)
min_far
=
self
.
_min_dig
,
color
=
kwargs
.
get
(
'color'
),
linestyle
=
kwargs
.
get
(
'linestyle'
),
label
=
kwargs
.
get
(
'label'
),
)
def
_get_farfrr
(
self
,
x
,
y
,
thres
):
...
...
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