From 24e704d8a4303c08115bfeec08fba841bf9f8c4d Mon Sep 17 00:00:00 2001
From: Manuel Gunther <siebenkopf@googlemail.com>
Date: Thu, 12 May 2016 17:42:46 -0600
Subject: [PATCH] Now using Pseudo-Inverse for LDA to avoid errors when
 covariance matrix is not invertible

---
 bob/bio/base/algorithm/LDA.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bob/bio/base/algorithm/LDA.py b/bob/bio/base/algorithm/LDA.py
index eb5dd4a2..7dfcc0b5 100644
--- a/bob/bio/base/algorithm/LDA.py
+++ b/bob/bio/base/algorithm/LDA.py
@@ -168,7 +168,7 @@ class LDA (Algorithm):
       data = self._perform_pca(pca_machine, data)
 
     logger.info("  -> Training Linear Machine using LDA")
-    trainer = bob.learn.linear.FisherLDATrainer(strip_to_rank = (self.lda_subspace is None))
+    trainer = bob.learn.linear.FisherLDATrainer(use_pinv = True, strip_to_rank = (self.lda_subspace is None))
     self.machine, self.variances = trainer.train(data)
     if self.lda_subspace is not None:
       self.machine.resize(self.machine.shape[0], self.lda_subspace)
-- 
GitLab