Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.pad.base
Commits
d79c8ab9
Commit
d79c8ab9
authored
Feb 26, 2018
by
Guillaume HEUSCH
Browse files
[SVM] made return score working for 1d
parent
196240af
Pipeline
#17183
failed with stage
in 14 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/base/algorithm/SVM.py
View file @
d79c8ab9
...
...
@@ -121,7 +121,6 @@ class SVM(Algorithm):
self
.
n_train_samples
=
n_train_samples
self
.
machine
=
None
# ==========================================================================
def
comp_prediction_precision
(
self
,
machine
,
real
,
attack
):
"""
...
...
@@ -468,7 +467,6 @@ class SVM(Algorithm):
Must be writable with the ``write_feature`` function and
readable with the ``read_feature`` function.
"""
if
isinstance
(
feature
,
FrameContainer
):
# if FrameContainer convert to 2D numpy array
...
...
@@ -517,6 +515,9 @@ class SVM(Algorithm):
Score is a probability of a sample being a real class.
"""
if
toscore
.
ndim
==
1
:
return
[
toscore
[
0
]]
if
self
.
frame_level_scores_flag
:
score
=
toscore
[:,
...
...
Write
Preview
Supports
Markdown
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