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
960feb2e
There was a problem fetching the pipeline summary.
Commit
960feb2e
authored
6 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
Small fixes
parent
63d3eae5
No related branches found
No related tags found
1 merge request
!48
Various fix
Pipeline
#
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/pad/base/script/pad_commands.py
+2
-2
2 additions, 2 deletions
bob/pad/base/script/pad_commands.py
bob/pad/base/script/vuln_commands.py
+10
-8
10 additions, 8 deletions
bob/pad/base/script/vuln_commands.py
bob/pad/base/script/vuln_figure.py
+4
-4
4 additions, 4 deletions
bob/pad/base/script/vuln_figure.py
with
16 additions
and
14 deletions
bob/pad/base/script/pad_commands.py
+
2
−
2
View file @
960feb2e
...
...
@@ -37,8 +37,8 @@ def gen(ctx, outdir, mean_match, mean_non_match, n_sys):
@common_options.metrics_command
(
common_options
.
METRICS_HELP
.
format
(
names
=
'
FtA, APCER, BPCER, FAR, FRR, ACER
'
,
criteria
=
CRITERIA
,
score_format
=
SCORE_FORMAT
,
hter_note
=
'
Note that FAR = APCER * (1 - FtA),
FRR = FtA + BPCER * (1 - FtA)
'
'
and ACER = (FMR + FMN
R) / 2.
'
,
hter_note
=
'
Note that FAR = APCER * (1 - FtA),
'
'
FRR = FtA + BPCER * (1 - FtA) and ACER = (APCER + BPCE
R) / 2.
'
,
command
=
'
bob pad metrics
'
),
criteria
=
CRITERIA
)
def
metrics
(
ctx
,
scores
,
evaluation
,
**
kwargs
):
process
=
figure
.
Metrics
(
ctx
,
scores
,
evaluation
,
load
.
split
)
...
...
This diff is collapsed.
Click to expand it.
bob/pad/base/script/vuln_commands.py
+
10
−
8
View file @
960feb2e
...
...
@@ -71,9 +71,9 @@ def write_scores_to_file(neg, pos, filename, attack=False):
@click.command
()
@click.argument
(
'
outdir
'
)
@click.option
(
'
--mean-gen
'
,
default
=
7
,
type
=
FLOAT
,
show_default
=
True
)
@click.option
(
'
--mean-zei
'
,
default
=
3
,
type
=
FLOAT
,
show_default
=
True
)
@click.option
(
'
--mean-pa
'
,
default
=
5
,
type
=
FLOAT
,
show_default
=
True
)
@click.option
(
'
-mg
'
,
'
--mean-gen
'
,
default
=
7
,
type
=
FLOAT
,
show_default
=
True
)
@click.option
(
'
-mz
'
,
'
--mean-zei
'
,
default
=
3
,
type
=
FLOAT
,
show_default
=
True
)
@click.option
(
'
-mp
'
,
'
--mean-pa
'
,
default
=
5
,
type
=
FLOAT
,
show_default
=
True
)
@verbosity_option
()
def
gen
(
outdir
,
mean_gen
,
mean_zei
,
mean_pa
):
"""
Generate random scores.
...
...
@@ -104,7 +104,7 @@ def gen(outdir, mean_gen, mean_zei, mean_pa):
@click.command
()
@common_options.scores_argument
(
min_arg
=
2
,
nargs
=-
1
)
@common_options.output_plot_file_option
(
default_out
=
'
vuln_
roc.pdf
'
)
@common_options.output_plot_file_option
(
default_out
=
'
roc.pdf
'
)
@common_options.legends_option
()
@common_options.no_legend_option
()
@common_options.legend_loc_option
(
dflt
=
'
upper-right
'
)
...
...
@@ -144,7 +144,7 @@ def roc(ctx, scores, real_data, **kwargs):
@click.command
()
@common_options.scores_argument
(
min_arg
=
2
,
nargs
=-
1
)
@common_options.output_plot_file_option
(
default_out
=
'
vuln_
det.pdf
'
)
@common_options.output_plot_file_option
(
default_out
=
'
det.pdf
'
)
@common_options.legends_option
()
@common_options.no_legend_option
()
@common_options.legend_loc_option
(
dflt
=
'
upper-right
'
)
...
...
@@ -184,7 +184,7 @@ def det(ctx, scores, real_data, **kwargs):
@click.command
()
@common_options.scores_argument
(
min_arg
=
2
,
force_eval
=
True
,
nargs
=-
1
)
@common_options.output_plot_file_option
(
default_out
=
'
vuln_
epc.pdf
'
)
@common_options.output_plot_file_option
(
default_out
=
'
epc.pdf
'
)
@common_options.legends_option
()
@common_options.no_legend_option
()
@common_options.legend_loc_option
()
...
...
@@ -228,7 +228,7 @@ def epc(ctx, scores, **kwargs):
@click.command
()
@common_options.scores_argument
(
min_arg
=
2
,
force_eval
=
True
,
nargs
=-
1
)
@common_options.output_plot_file_option
(
default_out
=
'
vuln_
epsc.pdf
'
)
@common_options.output_plot_file_option
(
default_out
=
'
epsc.pdf
'
)
@common_options.titles_option
()
@common_options.no_legend_option
()
@common_options.legend_loc_option
()
...
...
@@ -301,7 +301,7 @@ def epsc(ctx, scores, criteria, var_param, three_d, sampling,
@click.command
()
@common_options.scores_argument
(
nargs
=-
1
,
min_arg
=
2
)
@common_options.output_plot_file_option
(
default_out
=
'
vuln_
hist.pdf
'
)
@common_options.output_plot_file_option
(
default_out
=
'
hist.pdf
'
)
@common_options.n_bins_option
()
@common_options.criterion_option
()
@common_options.thresholds_option
()
...
...
@@ -347,6 +347,8 @@ def hist(ctx, scores, evaluation, **kwargs):
Examples:
$ bob vuln hist -v licit/scores-dev spoof/scores-dev
$ bob vuln hist -e -v licit/scores-dev licit/scores-eval
\
spoof/scores-dev spoof/scores-eval
...
...
This diff is collapsed.
Click to expand it.
bob/pad/base/script/vuln_figure.py
+
4
−
4
View file @
960feb2e
...
...
@@ -239,12 +239,12 @@ class Epsc(VulnPlot):
spoof_dev_pos
=
input_scores
[
2
][
1
]
spoof_eval_neg
=
input_scores
[
3
][
0
]
spoof_eval_pos
=
input_scores
[
3
][
1
]
merge_sys
=
(
self
.
_fixed_params
is
None
or
len
(
self
.
_fixed_params
)
==
1
)
and
self
.
n_systems
>
1
merge_sys
=
(
self
.
_fixed_params
is
None
or
len
(
self
.
_fixed_params
)
==
1
)
and
self
.
n_systems
>
1
if
not
merge_sys
or
idx
==
0
:
mpl
.
gcf
().
clear
()
# ax
i
s should only be created
and twin
on
e
ce
# ax
e
s should only be created once
self
.
_axis1
=
mpl
.
gca
()
self
.
_axis2
=
mpl
.
twinx
()
points
=
10
...
...
@@ -327,7 +327,7 @@ class Epsc(VulnPlot):
)
if
self
.
_titles
is
not
None
and
len
(
self
.
_titles
)
>
idx
:
title
=
self
.
_titles
[
idx
]
if
self
.
_titles
[
idx
].
replace
(
'
'
,
''
)
\
else
None
else
None
mpl
.
title
(
title
)
mpl
.
grid
()
...
...
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