<p>In <a href="https://github.com/mlpack/mlpack/pull/666#discussion_r65598729">src/mlpack/tests/binarize_test.cpp</a>:</p>
<pre style='color:#555'>&gt; +    const umat&amp; rhsCol = answer.col(i);
&gt; +    for (size_t j = 0; j &lt; lhsCol.n_rows; ++j)
&gt; +    {
&gt; +      if (std::abs(rhsCol(j)) &lt; 1e-5)
&gt; +        BOOST_REQUIRE_SMALL(lhsCol(j), 1e-5);
&gt; +      else
&gt; +        BOOST_REQUIRE_CLOSE(lhsCol(j), rhsCol(j), 1e-5);
&gt; +    }
&gt; +  }
&gt; +}
&gt; +
&gt; +BOOST_AUTO_TEST_CASE(BinarizeThreshold)
&gt; +{
&gt; +  mat input(10, 10, fill::randu); // fill input with randome Number
&gt; +  mat constMat(10, 10);
&gt; +  math::RandomSeed((size_t) std::time(NULL));
</pre>
<p>We should avoid setting the random seed in the tests, this can make specific test errors really hard to reproduce.  What I like to do is set the random seed like you did here and run like 1000 tests on my local machine to make sure it works, then remove the line that sets the seed.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/666/files/095842f1517c0200eaffa51ccdf05cbf28cff2dc#r65598729">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFDRfKzmYw22jjh2uOQ45UsFVWla6ks5qHyhvgaJpZM4IsxhK">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNLKliPSSepyCnnwnPCEE1FeruUwks5qHyhvgaJpZM4IsxhK.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/666/files/095842f1517c0200eaffa51ccdf05cbf28cff2dc#r65598729"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>