Commit 0d6da9b9 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH
Browse files

[algorithm] fixed LDA unit test

parent c720a2cb
Pipeline #21768 passed with stage
in 29 minutes and 59 seconds
......@@ -8,8 +8,8 @@ class PadLDA(LDA):
"""Wrapper for,
Here, LDA is used in a PAD context. This means that the feature
will be projected on a two-dimensional subspace, where the two
dimensions represents the real and attack classes.
will be projected on a single dimension subspace, which acts as a score
For more details, you may want to have a look at
`bob.learn.linear Documentation`_
......@@ -13,6 +13,7 @@ import bob.pad.base
from bob.pad.base.algorithm import SVM
from bob.pad.base.algorithm import OneClassGMM
from bob.pad.base.algorithm import MLP
from bob.pad.base.algorithm import PadLDA
import random
......@@ -231,8 +232,4 @@ def test_LDA():
lda = PadLDA()
lda.train_projector(training_features, '/tmp/lda.hdf5')
real_sample = real_array[0]
prob = lda.project(real_sample)
assert prob[0] > prob[1]
assert lda.machine.shape == (2, 1)
Supports Markdown
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