<p>In <a href="https://github.com/mlpack/mlpack/pull/388#discussion_r23584112">src/mlpack/tests/mean_shift_test.cpp</a>:</p>
<pre style='color:#555'>&gt; +  BOOST_REQUIRE_NE(firstClass, secondClass);
&gt; +  
&gt; +  for (size_t i = 13; i &lt; 20; i++)
&gt; +    BOOST_REQUIRE_EQUAL(assignments(i), secondClass);
&gt; +  
&gt; +  size_t thirdClass = assignments(20);
&gt; +  
&gt; +  // To ensure that this is the third class which we haven&#39;t seen yet.
&gt; +  BOOST_REQUIRE_NE(firstClass, thirdClass);
&gt; +  BOOST_REQUIRE_NE(secondClass, thirdClass);
&gt; +  
&gt; +  for (size_t i = 20; i &lt; 30; i++)
&gt; +    BOOST_REQUIRE_EQUAL(assignments(i), thirdClass);
&gt; +  
&gt; +}
&gt; +
</pre>
<p>Once we merge this I will probably add at least one more test where I generate observations from a mixture of Gaussians (that are sufficiently far apart) and ensure that the mean shift algorithm will properly label each point.  You can do this now if you like, but I wanted to let you know that I'm planning to do that.  More tests, in general, is a good thing.  It may be worth adding some simple tests like "if I set the duplicate threshold to 0, do I get dataset.n_cols clusters?"; this is helpful to people who might be modifying the code later on and want to make sure it still functions the same way.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/388/files#r23584112">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFDsRdRcTaM0ROxXNrCUhWOWoppwiks5nlvS0gaJpZM4DTzb1.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/388/files#r23584112"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>