Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.bio.gmm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.bio.gmm
Commits
fe6f57df
There was a problem fetching the pipeline summary.
Commit
fe6f57df
authored
7 years ago
by
Manuel Günther
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-lda-rank' into 'master'
IVector - Fix LDA rank See merge request
!21
parents
0ef9210c
771e9e46
No related branches found
No related tags found
1 merge request
!21
IVector - Fix LDA rank
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/bio/gmm/algorithm/IVector.py
+12
-3
12 additions, 3 deletions
bob/bio/gmm/algorithm/IVector.py
version.txt
+1
-1
1 addition, 1 deletion
version.txt
with
13 additions
and
4 deletions
bob/bio/gmm/algorithm/IVector.py
+
12
−
3
View file @
fe6f57df
...
@@ -28,7 +28,8 @@ class IVector (GMM):
...
@@ -28,7 +28,8 @@ class IVector (GMM):
use_lda
=
False
,
use_lda
=
False
,
use_wccn
=
False
,
use_wccn
=
False
,
use_plda
=
False
,
use_plda
=
False
,
lda_dim
=
50
,
lda_dim
=
None
,
lda_strip_to_rank
=
True
,
plda_dim_F
=
50
,
plda_dim_F
=
50
,
plda_dim_G
=
50
,
plda_dim_G
=
50
,
plda_training_iterations
=
50
,
plda_training_iterations
=
50
,
...
@@ -55,6 +56,7 @@ class IVector (GMM):
...
@@ -55,6 +56,7 @@ class IVector (GMM):
use_wccn
=
use_wccn
,
use_wccn
=
use_wccn
,
use_plda
=
use_plda
,
use_plda
=
use_plda
,
lda_dim
=
lda_dim
,
lda_dim
=
lda_dim
,
lda_strip_to_rank
=
lda_strip_to_rank
,
plda_dim_F
=
plda_dim_F
,
plda_dim_F
=
plda_dim_F
,
plda_dim_G
=
plda_dim_G
,
plda_dim_G
=
plda_dim_G
,
plda_training_iterations
=
plda_training_iterations
,
plda_training_iterations
=
plda_training_iterations
,
...
@@ -76,7 +78,7 @@ class IVector (GMM):
...
@@ -76,7 +78,7 @@ class IVector (GMM):
self
.
whitening_trainer
=
bob
.
learn
.
linear
.
WhiteningTrainer
()
self
.
whitening_trainer
=
bob
.
learn
.
linear
.
WhiteningTrainer
()
self
.
lda_dim
=
lda_dim
self
.
lda_dim
=
lda_dim
self
.
lda_trainer
=
bob
.
learn
.
linear
.
FisherLDATrainer
(
strip_to_rank
=
False
)
self
.
lda_trainer
=
bob
.
learn
.
linear
.
FisherLDATrainer
(
strip_to_rank
=
lda_strip_to_rank
)
self
.
wccn_trainer
=
bob
.
learn
.
linear
.
WCCNTrainer
()
self
.
wccn_trainer
=
bob
.
learn
.
linear
.
WCCNTrainer
()
self
.
plda_trainer
=
bob
.
learn
.
em
.
PLDATrainer
()
self
.
plda_trainer
=
bob
.
learn
.
em
.
PLDATrainer
()
self
.
plda_dim_F
=
plda_dim_F
self
.
plda_dim_F
=
plda_dim_F
...
@@ -112,9 +114,16 @@ class IVector (GMM):
...
@@ -112,9 +114,16 @@ class IVector (GMM):
def
train_lda
(
self
,
training_features
):
def
train_lda
(
self
,
training_features
):
logger
.
info
(
"
-> Training LDA projector
"
)
logger
.
info
(
"
-> Training LDA projector
"
)
self
.
lda
,
__eig_vals
=
self
.
lda_trainer
.
train
(
training_features
)
self
.
lda
,
__eig_vals
=
self
.
lda_trainer
.
train
(
training_features
)
# resize the machine if desired
# resize the machine if desired
if
self
.
lda_dim
:
# You can only clip if the rank is higher than LDA_DIM
if
self
.
lda_dim
is
not
None
:
if
len
(
__eig_vals
)
<
self
.
lda_dim
:
logger
.
warning
(
"
-> You are resizing the LDA matrix to a value above its rank
"
"
(from {0} to {1}). Be aware that this may lead you to imprecise eigenvectors.
"
.
\
format
(
len
(
__eig_vals
),
self
.
lda_dim
))
self
.
lda
.
resize
(
self
.
lda
.
shape
[
0
],
self
.
lda_dim
)
self
.
lda
.
resize
(
self
.
lda
.
shape
[
0
],
self
.
lda_dim
)
def
train_wccn
(
self
,
training_features
):
def
train_wccn
(
self
,
training_features
):
logger
.
info
(
"
-> Training WCCN projector
"
)
logger
.
info
(
"
-> Training WCCN projector
"
)
...
...
This diff is collapsed.
Click to expand it.
version.txt
+
1
−
1
View file @
fe6f57df
3.2.2b0
3.3.0b0
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment