[mlpack-svn] r10341 - mlpack/trunk/src/mlpack/tests

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Mon Nov 21 14:08:55 EST 2011


Author: rcurtin
Date: 2011-11-21 14:08:55 -0500 (Mon, 21 Nov 2011)
New Revision: 10341

Modified:
   mlpack/trunk/src/mlpack/tests/hmm_test.cpp
Log:
Widen tolerances for unlabeled training.


Modified: mlpack/trunk/src/mlpack/tests/hmm_test.cpp
===================================================================
--- mlpack/trunk/src/mlpack/tests/hmm_test.cpp	2011-11-21 19:05:38 UTC (rev 10340)
+++ mlpack/trunk/src/mlpack/tests/hmm_test.cpp	2011-11-21 19:08:55 UTC (rev 10341)
@@ -683,26 +683,27 @@
 
   hmm.Train(observations);
 
-  // We use an absolute tolerance of 0.01 for the transition matrices.
+  // The tolerances are increased because there is more error in unlabeled
+  // training; we use an absolute tolerance of 0.02 for the transition matrices.
   // Check that the transition matrix is correct.
   for (size_t row = 0; row < 3; row++)
     for (size_t col = 0; col < 3; col++)
       BOOST_REQUIRE_SMALL(transition(row, col) - hmm.Transition()(row, col),
-          0.01);
+          0.02);
 
   // Check that each distribution is correct.
   for (size_t dist = 0; dist < 3; dist++)
   {
-    // Check that the mean is correct.  Absolute tolerance of 0.04.
+    // Check that the mean is correct.  Absolute tolerance of 0.06.
     for (size_t dim = 0; dim < 3; dim++)
       BOOST_REQUIRE_SMALL(hmm.Emission()[dist].Mean()(dim) -
-          emission[dist].Mean()(dim), 0.04);
+          emission[dist].Mean()(dim), 0.06);
 
-    // Check that the covariance is correct.  Absolute tolerance of 0.075.
+    // Check that the covariance is correct.  Absolute tolerance of 0.09.
     for (size_t row = 0; row < 3; row++)
       for (size_t col = 0; col < 3; col++)
         BOOST_REQUIRE_SMALL(hmm.Emission()[dist].Covariance()(row, col) -
-            emission[dist].Covariance()(row, col), 0.075);
+            emission[dist].Covariance()(row, col), 0.09);
   }
 }
 




More information about the mlpack-svn mailing list