Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.pad.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.pad.base
Commits
69bd13ce
Commit
69bd13ce
authored
5 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
Use plot.roc instead of plot.roc_for_far in vulnerability ROC plots
parent
bed08162
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!63
Use plot.roc instead of plot.roc_for_far in vulnerability ROC plots
Pipeline
#31340
passed
5 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/pad/base/script/vuln_figure.py
+7
-4
7 additions, 4 deletions
bob/pad/base/script/vuln_figure.py
with
7 additions
and
4 deletions
bob/pad/base/script/vuln_figure.py
+
7
−
4
View file @
69bd13ce
...
@@ -435,6 +435,7 @@ class BaseVulnDetRoc(VulnPlot):
...
@@ -435,6 +435,7 @@ class BaseVulnDetRoc(VulnPlot):
self
.
_fnmrs_at
=
ctx
.
meta
.
get
(
'
fnmr
'
,
[])
self
.
_fnmrs_at
=
ctx
.
meta
.
get
(
'
fnmr
'
,
[])
self
.
_real_data
=
True
if
real_data
is
None
else
real_data
self
.
_real_data
=
True
if
real_data
is
None
else
real_data
self
.
_legend_loc
=
None
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
):
def
compute
(
self
,
idx
,
input_scores
,
input_names
):
'''
Implements plots
'''
'''
Implements plots
'''
...
@@ -626,12 +627,14 @@ class RocVuln(BaseVulnDetRoc):
...
@@ -626,12 +627,14 @@ class RocVuln(BaseVulnDetRoc):
def
_plot
(
self
,
x
,
y
,
points
,
**
kwargs
):
def
_plot
(
self
,
x
,
y
,
points
,
**
kwargs
):
LOGGER
.
info
(
"
Plot ROC
"
)
LOGGER
.
info
(
"
Plot ROC
"
)
plot
.
roc
_for_far
(
plot
.
roc
(
x
,
y
,
x
,
y
,
far_values
=
plot
.
log_values
(
self
.
_min_dig
or
-
4
)
,
npoints
=
self
.
_points
,
CAR
=
self
.
_semilogx
,
CAR
=
self
.
_semilogx
,
color
=
kwargs
.
get
(
'
color
'
),
linestyle
=
kwargs
.
get
(
'
linestyle
'
),
min_far
=
self
.
_min_dig
,
label
=
kwargs
.
get
(
'
label
'
)
color
=
kwargs
.
get
(
'
color
'
),
linestyle
=
kwargs
.
get
(
'
linestyle
'
),
label
=
kwargs
.
get
(
'
label
'
),
)
)
def
_get_farfrr
(
self
,
x
,
y
,
thres
):
def
_get_farfrr
(
self
,
x
,
y
,
thres
):
...
...
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