[mlpack-svn] r14831 - mlpack/trunk/src/mlpack/methods/gmm

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Apr 3 16:27:27 EDT 2013


Author: rcurtin
Date: 2013-04-03 16:27:26 -0400 (Wed, 03 Apr 2013)
New Revision: 14831

Modified:
   mlpack/trunk/src/mlpack/methods/gmm/em_fit_impl.hpp
Log:
Add perturbation to ensure that the covariance matrix does not end up empty (and
therefore singular).


Modified: mlpack/trunk/src/mlpack/methods/gmm/em_fit_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/gmm/em_fit_impl.hpp	2013-04-03 19:59:30 UTC (rev 14830)
+++ mlpack/trunk/src/mlpack/methods/gmm/em_fit_impl.hpp	2013-04-03 20:27:26 UTC (rev 14831)
@@ -178,6 +178,7 @@
   {
     means[i].zeros();
     covariances[i].zeros();
+    covariances[i].diag().fill(1e-200);
   }
 
   // From the assignments, generate our means, covariances, and weights.




More information about the mlpack-svn mailing list