Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.measure
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.measure
Commits
02d54901
Commit
02d54901
authored
10 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Reduce ties with Bob/C++
parent
809d1d53
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/measure/test_error.py
+0
-9
0 additions, 9 deletions
bob/measure/test_error.py
bob/measure/version.cpp
+0
-10
0 additions, 10 deletions
bob/measure/version.cpp
with
0 additions
and
19 deletions
bob/measure/test_error.py
+
0
−
9
View file @
02d54901
...
@@ -13,11 +13,6 @@ import numpy
...
@@ -13,11 +13,6 @@ import numpy
import
nose.tools
import
nose.tools
import
bob.io.base
import
bob.io.base
from
.version
import
externals
from
distutils.version
import
StrictVersion
if
StrictVersion
(
externals
[
'
Bob
'
][
0
])
<
'
1.3.0a0
'
:
HAVE_BOB_1_2_2
=
True
else
:
HAVE_BOB_1_2_2
=
False
def
F
(
f
):
def
F
(
f
):
"""
Returns the test file on the
"
data
"
subdirectory
"""
"""
Returns the test file on the
"
data
"
subdirectory
"""
import
pkg_resources
import
pkg_resources
...
@@ -189,7 +184,6 @@ def test_plots():
...
@@ -189,7 +184,6 @@ def test_plots():
# uncomment the next line to save a reference value
# uncomment the next line to save a reference value
# save('nonsep-roc.hdf5', xy)
# save('nonsep-roc.hdf5', xy)
xyref
=
bob
.
io
.
base
.
load
(
F
(
'
nonsep-roc.hdf5
'
))
xyref
=
bob
.
io
.
base
.
load
(
F
(
'
nonsep-roc.hdf5
'
))
if
HAVE_BOB_1_2_2
:
xyref
=
xyref
[::
-
1
,:]
assert
numpy
.
array_equal
(
xy
,
xyref
)
assert
numpy
.
array_equal
(
xy
,
xyref
)
# This example will test the Precision-Recall plot calculation functionality.
# This example will test the Precision-Recall plot calculation functionality.
...
@@ -204,7 +198,6 @@ def test_plots():
...
@@ -204,7 +198,6 @@ def test_plots():
# uncomment the next line to save a reference value
# uncomment the next line to save a reference value
# save('nonsep-det.hdf5', det_xyzw)
# save('nonsep-det.hdf5', det_xyzw)
det_xyzw_ref
=
bob
.
io
.
base
.
load
(
F
(
'
nonsep-det.hdf5
'
))
det_xyzw_ref
=
bob
.
io
.
base
.
load
(
F
(
'
nonsep-det.hdf5
'
))
if
HAVE_BOB_1_2_2
:
det_xyzw_ref
=
det_xyzw_ref
[::
-
1
,:]
assert
numpy
.
allclose
(
det_xyzw
,
det_xyzw_ref
,
atol
=
1e-15
)
assert
numpy
.
allclose
(
det_xyzw
,
det_xyzw_ref
,
atol
=
1e-15
)
# This example will test the EPC plot calculation functionality. For the
# This example will test the EPC plot calculation functionality. For the
...
@@ -235,7 +228,6 @@ def test_rocch():
...
@@ -235,7 +228,6 @@ def test_rocch():
negatives
=
bob
.
io
.
base
.
load
(
F
(
'
linsep-negatives.hdf5
'
))
negatives
=
bob
.
io
.
base
.
load
(
F
(
'
linsep-negatives.hdf5
'
))
# References obtained using Bosaris 1.06
# References obtained using Bosaris 1.06
pmiss_pfa_ref
=
numpy
.
array
([[
1.
,
0.
,
0.
],
[
0.
,
0.
,
1.
]])
pmiss_pfa_ref
=
numpy
.
array
([[
1.
,
0.
,
0.
],
[
0.
,
0.
,
1.
]])
if
HAVE_BOB_1_2_2
:
pmiss_pfa_ref
=
pmiss_pfa_ref
[::
-
1
,:]
eer_ref
=
0.
eer_ref
=
0.
# Computes
# Computes
pmiss_pfa
=
rocch
(
negatives
,
positives
)
pmiss_pfa
=
rocch
(
negatives
,
positives
)
...
@@ -250,7 +242,6 @@ def test_rocch():
...
@@ -250,7 +242,6 @@ def test_rocch():
negatives
=
bob
.
io
.
base
.
load
(
F
(
'
nonsep-negatives.hdf5
'
))
negatives
=
bob
.
io
.
base
.
load
(
F
(
'
nonsep-negatives.hdf5
'
))
# References obtained using Bosaris 1.06
# References obtained using Bosaris 1.06
pmiss_pfa_ref
=
numpy
.
array
([[
1.
,
0.68
,
0.28
,
0.1
,
0.06
,
0.
,
0.
],
[
0
,
0
,
0.08
,
0.12
,
0.22
,
0.48
,
1.
]])
pmiss_pfa_ref
=
numpy
.
array
([[
1.
,
0.68
,
0.28
,
0.1
,
0.06
,
0.
,
0.
],
[
0
,
0
,
0.08
,
0.12
,
0.22
,
0.48
,
1.
]])
if
HAVE_BOB_1_2_2
:
pmiss_pfa_ref
=
pmiss_pfa_ref
[::
-
1
,:]
eer_ref
=
0.116363636363636
eer_ref
=
0.116363636363636
# Computes
# Computes
pmiss_pfa
=
rocch
(
negatives
,
positives
)
pmiss_pfa
=
rocch
(
negatives
,
positives
)
...
...
This diff is collapsed.
Click to expand it.
bob/measure/version.cpp
+
0
−
10
View file @
02d54901
...
@@ -7,8 +7,6 @@
...
@@ -7,8 +7,6 @@
#include
<Python.h>
#include
<Python.h>
#include
<bob/config.h>
#include
<string>
#include
<string>
#include
<cstdlib>
#include
<cstdlib>
#include
<blitz/blitz.h>
#include
<blitz/blitz.h>
...
@@ -81,13 +79,6 @@ static PyObject* python_version() {
...
@@ -81,13 +79,6 @@ static PyObject* python_version() {
return
Py_BuildValue
(
"s"
,
f
.
str
().
c_str
());
return
Py_BuildValue
(
"s"
,
f
.
str
().
c_str
());
}
}
/**
* Bob version, API version and platform
*/
static
PyObject
*
bob_version
()
{
return
Py_BuildValue
(
"sis"
,
BOB_VERSION
,
BOB_API_VERSION
,
BOB_PLATFORM
);
}
/**
/**
* Numpy version
* Numpy version
*/
*/
...
@@ -123,7 +114,6 @@ static PyObject* build_version_dictionary() {
...
@@ -123,7 +114,6 @@ static PyObject* build_version_dictionary() {
if
(
!
dict_steal
(
retval
,
"NumPy"
,
numpy_version
()))
return
0
;
if
(
!
dict_steal
(
retval
,
"NumPy"
,
numpy_version
()))
return
0
;
if
(
!
dict_steal
(
retval
,
"bob.blitz"
,
bob_blitz_version
()))
return
0
;
if
(
!
dict_steal
(
retval
,
"bob.blitz"
,
bob_blitz_version
()))
return
0
;
if
(
!
dict_steal
(
retval
,
"bob.core"
,
bob_core_version
()))
return
0
;
if
(
!
dict_steal
(
retval
,
"bob.core"
,
bob_core_version
()))
return
0
;
if
(
!
dict_steal
(
retval
,
"Bob"
,
bob_version
()))
return
0
;
Py_INCREF
(
retval
);
Py_INCREF
(
retval
);
return
retval
;
return
retval
;
...
...
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