Skip to content
Snippets Groups Projects
Commit 0d6da9b9 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[algorithm] fixed LDA unit test

parent c720a2cb
Branches
Tags
1 merge request!50Add new classification algorithms
Pipeline #
...@@ -8,8 +8,8 @@ class PadLDA(LDA): ...@@ -8,8 +8,8 @@ class PadLDA(LDA):
"""Wrapper for bob.bio.base.algorithm.LDA, """Wrapper for bob.bio.base.algorithm.LDA,
Here, LDA is used in a PAD context. This means that the feature Here, LDA is used in a PAD context. This means that the feature
will be projected on a two-dimensional subspace, where the two will be projected on a single dimension subspace, which acts as a score
dimensions represents the real and attack classes.
For more details, you may want to have a look at For more details, you may want to have a look at
`bob.learn.linear Documentation`_ `bob.learn.linear Documentation`_
......
...@@ -13,6 +13,7 @@ import bob.pad.base ...@@ -13,6 +13,7 @@ import bob.pad.base
from bob.pad.base.algorithm import SVM from bob.pad.base.algorithm import SVM
from bob.pad.base.algorithm import OneClassGMM from bob.pad.base.algorithm import OneClassGMM
from bob.pad.base.algorithm import MLP from bob.pad.base.algorithm import MLP
from bob.pad.base.algorithm import PadLDA
import random import random
...@@ -231,8 +232,4 @@ def test_LDA(): ...@@ -231,8 +232,4 @@ def test_LDA():
lda = PadLDA() lda = PadLDA()
lda.train_projector(training_features, '/tmp/lda.hdf5') lda.train_projector(training_features, '/tmp/lda.hdf5')
assert lda.machine.shape == (2, 1)
real_sample = real_array[0]
prob = lda.project(real_sample)
assert prob[0] > prob[1]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment