Commit d79c8ab9 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH

[SVM] made return score working for 1d

parent 196240af
Pipeline #17183 failed with stage
in 14 minutes and 35 seconds
......@@ -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[:,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment