Skip to content
GitLab
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
0d6da9b9
Commit
0d6da9b9
authored
Jul 10, 2018
by
Guillaume HEUSCH
Browse files
[algorithm] fixed LDA unit test
parent
c720a2cb
Pipeline
#21768
passed with stage
in 29 minutes and 59 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/pad/base/algorithm/PadLDA.py
View file @
0d6da9b9
...
...
@@ -8,8 +8,8 @@ class PadLDA(LDA):
"""Wrapper for bob.bio.base.algorithm.LDA,
Here, LDA is used in a PAD context. This means that the feature
will be projected on a
two-
dimension
al
subspace, wh
ere the two
dimensions represents the real and attack classes.
will be projected on a
single
dimension subspace, wh
ich acts as a score
For more details, you may want to have a look at
`bob.learn.linear Documentation`_
...
...
bob/pad/base/test/test_algorithms.py
View file @
0d6da9b9
...
...
@@ -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
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment