Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
bob.measure
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bob
bob.measure
Commits
cb9cfbb7
Commit
cb9cfbb7
authored
Nov 17, 2017
by
Amir MOHAMMADI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use C nexttoward
parent
1662e41e
Pipeline
#14133
passed with stages
in 7 minutes and 5 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
bob/measure/cpp/error.cpp
bob/measure/cpp/error.cpp
+3
-3
No files found.
bob/measure/cpp/error.cpp
View file @
cb9cfbb7
...
...
@@ -126,7 +126,7 @@ double bob::measure::farThreshold(const blitz::Array<double, 1> &negatives,
double
epsilon
=
std
::
numeric_limits
<
double
>::
epsilon
();
// handle special case of far == 1 without any iterating
if
(
far_value
>=
1
-
epsilon
)
return
std
::
nexttoward
(
scores
(
0
),
scores
(
0
)
-
1
);
return
nexttoward
(
scores
(
0
),
scores
(
0
)
-
1
);
// Reverse negatives so the end is the start. This way the code below will be
// very similar to the implementation in the frrThreshold function. The
...
...
@@ -139,7 +139,7 @@ double bob::measure::farThreshold(const blitz::Array<double, 1> &negatives,
// since the comparison is `if score >= threshold then accept as genuine`, we
// can choose the largest score value + eps as the threshold so that we can
// get for 0% FAR.
double
valid_threshold
=
std
::
nexttoward
(
scores
(
current_position
),
scores
(
current_position
)
+
1
);
double
valid_threshold
=
nexttoward
(
scores
(
current_position
),
scores
(
current_position
)
+
1
);
double
current_threshold
;
double
future_far
;
while
(
current_position
<
total_count
)
{
...
...
@@ -181,7 +181,7 @@ double bob::measure::frrThreshold(const blitz::Array<double, 1> &negatives,
double
epsilon
=
std
::
numeric_limits
<
double
>::
epsilon
();
// handle special case of frr == 1 without any iterating
if
(
frr_value
>=
1
-
epsilon
)
return
std
::
nexttoward
(
scores
(
scores
.
extent
(
0
)
-
1
),
scores
(
scores
.
extent
(
0
)
-
1
)
+
1
);
return
nexttoward
(
scores
(
scores
.
extent
(
0
)
-
1
),
scores
(
scores
.
extent
(
0
)
-
1
)
+
1
);
// Move towards the end of array changing the threshold until we pass the
// desired FRR value. Starting with a threshold that corresponds to FRR == 0.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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