From 5c873dad345d07045185936f7de0eb85c373cc52 Mon Sep 17 00:00:00 2001
From: Manuel Guenther <manuel.guenther@idiap.ch>
Date: Thu, 25 Jun 2015 17:26:17 +0200
Subject: [PATCH] Fixed issues with unused functions in algorithms

---
 bob/bio/base/algorithm/BIC.py       | 10 +++++-----
 bob/bio/base/algorithm/LDA.py       |  4 ++--
 bob/bio/base/algorithm/PCA.py       |  4 ++--
 bob/bio/base/algorithm/PLDA.py      | 10 +++++-----
 bob/bio/base/extractor/Linearize.py |  4 ++--
 doc/experiments.rst                 |  1 +
 6 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/bob/bio/base/algorithm/BIC.py b/bob/bio/base/algorithm/BIC.py
index b15aa3ae..a5eb7e01 100644
--- a/bob/bio/base/algorithm/BIC.py
+++ b/bob/bio/base/algorithm/BIC.py
@@ -279,8 +279,8 @@ class BIC (Algorithm):
     return self.model_fusion_function(scores)
 
   # re-define unused functions, just so that they do not get documented
-  def train_projector(): raise NotImplementedError()
-  def load_projector(): raise NotImplementedError()
-  def project(): raise NotImplementedError()
-  def write_feature(): raise NotImplementedError()
-  def read_feature(): raise NotImplementedError()
+  def train_projector(*args,**kwargs): raise NotImplementedError()
+  def load_projector(*args,**kwargs): pass
+  def project(*args,**kwargs): raise NotImplementedError()
+  def write_feature(*args,**kwargs): raise NotImplementedError()
+  def read_feature(*args,**kwargs): raise NotImplementedError()
diff --git a/bob/bio/base/algorithm/LDA.py b/bob/bio/base/algorithm/LDA.py
index ef71e458..eb5dd4a2 100644
--- a/bob/bio/base/algorithm/LDA.py
+++ b/bob/bio/base/algorithm/LDA.py
@@ -276,5 +276,5 @@ class LDA (Algorithm):
       return self.factor * self.distance_function(model, probe)
 
   # re-define unused functions, just so that they do not get documented
-  def train_enroller(): raise NotImplementedError()
-  def load_enroller(): raise NotImplementedError()
+  def train_enroller(*args,**kwargs): raise NotImplementedError()
+  def load_enroller(*args,**kwargs): pass
diff --git a/bob/bio/base/algorithm/PCA.py b/bob/bio/base/algorithm/PCA.py
index 19245ce4..ce6d6ee2 100644
--- a/bob/bio/base/algorithm/PCA.py
+++ b/bob/bio/base/algorithm/PCA.py
@@ -206,5 +206,5 @@ class PCA (Algorithm):
       return self.factor * self.distance_function(model, probe)
 
   # re-define unused functions, just so that they do not get documented
-  def train_enroller(): raise NotImplementedError()
-  def load_enroller(): raise NotImplementedError()
+  def train_enroller(*args,**kwargs): raise NotImplementedError()
+  def load_enroller(*args,**kwargs): pass
diff --git a/bob/bio/base/algorithm/PLDA.py b/bob/bio/base/algorithm/PLDA.py
index a8c38a85..a561f43d 100644
--- a/bob/bio/base/algorithm/PLDA.py
+++ b/bob/bio/base/algorithm/PLDA.py
@@ -171,8 +171,8 @@ class PLDA (Algorithm):
       return self.score_set([model.log_likelihood_ratio(probe) for probe in probes])
 
   # re-define unused functions, just so that they do not get documented
-  def train_projector(): raise NotImplementedError()
-  def load_projector(): raise NotImplementedError()
-  def project(): raise NotImplementedError()
-  def write_feature(): raise NotImplementedError()
-  def read_feature(): raise NotImplementedError()
+  def train_projector(*args,**kwargs): raise NotImplementedError()
+  def load_projector(*args,**kwargs): pass
+  def project(*args,**kwargs): raise NotImplementedError()
+  def write_feature(*args,**kwargs): raise NotImplementedError()
+  def read_feature(*args,**kwargs): raise NotImplementedError()
diff --git a/bob/bio/base/extractor/Linearize.py b/bob/bio/base/extractor/Linearize.py
index d6ff09be..d686bd70 100644
--- a/bob/bio/base/extractor/Linearize.py
+++ b/bob/bio/base/extractor/Linearize.py
@@ -55,5 +55,5 @@ class Linearize (Extractor):
 
 
   # re-define unused functions, just so that they do not get documented
-  def train(): raise NotImplementedError()
-  def load(): raise NotImplementedError()
+  def train(*args,**kwargs): raise NotImplementedError()
+  def load(*args,**kwargs): pass
diff --git a/doc/experiments.rst b/doc/experiments.rst
index 6f7e039a..cbda6b46 100644
--- a/doc/experiments.rst
+++ b/doc/experiments.rst
@@ -118,6 +118,7 @@ By default, you can find them in a sub-directory the ``result`` directory, but y
    At Idiap_, the default result directory differs, see ``./bin/verify.py --help`` for your directory.
 
 
+.. _bob.bio.base.evaluate:
 
 Evaluating Experiments
 ----------------------
-- 
GitLab