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
3a88f2c7
Commit
3a88f2c7
authored
7 years ago
by
Theophile GENTILHOMME
Browse files
Options
Downloads
Plain Diff
Merge branch 'theo' of gitlab.idiap.ch:bob/bob.measure into theo-conf-inter
parents
69ed5c34
3b270041
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!54
Refactors the score loading and scripts functionality
,
!51
Confidence intervals
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bob/measure/data/two-cols.hdf5
+0
-0
0 additions, 0 deletions
bob/measure/data/two-cols.hdf5
bob/measure/load.py
+1
-1
1 addition, 1 deletion
bob/measure/load.py
bob/measure/test_load.py
+12
-0
12 additions, 0 deletions
bob/measure/test_load.py
with
13 additions
and
1 deletion
bob/measure/data/two-cols.hdf5
0 → 100644
+
0
−
0
View file @
3a88f2c7
File added
This diff is collapsed.
Click to expand it.
bob/measure/load.py
+
1
−
1
View file @
3a88f2c7
...
...
@@ -35,7 +35,7 @@ def split(filename):
try
:
columns
=
numpy
.
loadtxt
(
filename
)
neg_pos
=
columns
[:,
0
]
scores
=
columns
[:,
0
]
scores
=
columns
[:,
1
]
except
:
LOGGER
.
error
(
'''
Cannot read {}. This file must be a two columns file with
the first column containing -1 or 1 (i.e. negative or
...
...
This diff is collapsed.
Click to expand it.
bob/measure/test_load.py
+
12
−
0
View file @
3a88f2c7
...
...
@@ -10,6 +10,9 @@
from
nose.tools
import
assert_equal
import
bob.measure.load
import
bob.io.base.test_utils
import
bob.io.base
import
numpy
def
test_split
():
...
...
@@ -22,3 +25,12 @@ def test_split():
assert
neg
is
not
None
assert_equal
(
len
(
neg
),
521
)
assert_equal
(
len
(
pos
),
479
)
test_ref_file_path
=
bob
.
io
.
base
.
test_utils
.
datafile
(
'
two-cols.hdf5
'
,
'
bob.measure
'
)
test_ref
=
bob
.
io
.
base
.
HDF5File
(
test_ref_file_path
)
neg_ref
=
test_ref
.
read
(
'
negatives
'
)
pos_ref
=
test_ref
.
read
(
'
positives
'
)
del
test_ref
assert
numpy
.
array_equal
(
numpy
.
nan_to_num
(
neg_ref
),
numpy
.
nan_to_num
(
neg
))
assert
numpy
.
array_equal
(
numpy
.
nan_to_num
(
pos_ref
),
numpy
.
nan_to_num
(
pos
))
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