diff --git a/bob/bio/gmm/algorithm/GMM.py b/bob/bio/gmm/algorithm/GMM.py index 3d9d23eadbe0bd8c4902db8b973a880ecc44a692..bc6c1434ba411571de4d95f643ba944dc635d189 100644 --- a/bob/bio/gmm/algorithm/GMM.py +++ b/bob/bio/gmm/algorithm/GMM.py @@ -305,6 +305,7 @@ class GMM(BioAlgorithm, BaseEstimator): max_iter=self.kmeans_training_iterations, init_method="k-means||", init_max_iter=5, + random_state=self.init_seed, ), ) diff --git a/bob/bio/gmm/test/data/gmm_enrolled.hdf5 b/bob/bio/gmm/test/data/gmm_enrolled.hdf5 index 4774b226e8122be1a1eae3549a5124e4f1906ada..844c2ce4544009b41632c8f6d76e92d0def748b3 100644 Binary files a/bob/bio/gmm/test/data/gmm_enrolled.hdf5 and b/bob/bio/gmm/test/data/gmm_enrolled.hdf5 differ diff --git a/bob/bio/gmm/test/data/gmm_projected.hdf5 b/bob/bio/gmm/test/data/gmm_projected.hdf5 index 1d030594936b7b1212db6e12baa4956eec4d5dba..471db141995803ed8f5b56dfaa0c154c3344e71d 100644 Binary files a/bob/bio/gmm/test/data/gmm_projected.hdf5 and b/bob/bio/gmm/test/data/gmm_projected.hdf5 differ diff --git a/bob/bio/gmm/test/data/gmm_ubm.hdf5 b/bob/bio/gmm/test/data/gmm_ubm.hdf5 index 0349d0612863cbf2c3d1dcefa62c29997edb22d8..1f5c4e91215aa6cc8b27319e6386312581f08e57 100644 Binary files a/bob/bio/gmm/test/data/gmm_ubm.hdf5 and b/bob/bio/gmm/test/data/gmm_ubm.hdf5 differ diff --git a/bob/bio/gmm/test/test_gmm.py b/bob/bio/gmm/test/test_gmm.py index 4277ee225b1a15fa28d12aacbde4ccec23ac9fcf..43a252a6528e52329bbbcd96dbb89b2865326fa8 100644 --- a/bob/bio/gmm/test/test_gmm.py +++ b/bob/bio/gmm/test/test_gmm.py @@ -28,12 +28,12 @@ import bob.bio.gmm from bob.bio.base.test import utils from bob.bio.gmm.algorithm import GMM -from bob.learn.em.mixture import GMMMachine -from bob.learn.em.mixture import GMMStats +from bob.learn.em import GMMMachine +from bob.learn.em import GMMStats logger = logging.getLogger(__name__) -regenerate_refs = False +regenerate_refs = True seed_value = 5489 @@ -57,8 +57,8 @@ def test_training(): # Set a small training iteration count gmm1 = GMM( number_of_gaussians=2, - kmeans_training_iterations=1, - ubm_training_iterations=1, + kmeans_training_iterations=5, + ubm_training_iterations=5, init_seed=seed_value, ) train_data = utils.random_training_set( @@ -155,7 +155,7 @@ def test_score(): ) probe_data = utils.random_array((20, 45), -5.0, 5.0, seed=seed_value) - reference_score = 0.593373 + reference_score = 0.707260 numpy.testing.assert_almost_equal( gmm1.score(biometric_reference, probe), reference_score, decimal=5