<p>In <a href="https://github.com/mlpack/mlpack/pull/388#discussion_r23611075">src/mlpack/tests/mean_shift_test.cpp</a>:</p>
<pre style='color:#555'>> + BOOST_REQUIRE_NE(firstClass, secondClass);
> +
> + for (size_t i = 13; i < 20; i++)
> + BOOST_REQUIRE_EQUAL(assignments(i), secondClass);
> +
> + size_t thirdClass = assignments(20);
> +
> + // To ensure that this is the third class which we haven't seen yet.
> + BOOST_REQUIRE_NE(firstClass, thirdClass);
> + BOOST_REQUIRE_NE(secondClass, thirdClass);
> +
> + for (size_t i = 20; i < 30; i++)
> + BOOST_REQUIRE_EQUAL(assignments(i), thirdClass);
> +
> +}
> +
</pre>
<p>Two points may converge to one same centroid, so even duplicate thresh is set to 0, the number of clusters may be still less than dataset.n_cols.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/388/files#r23611075">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFONjc27fGYEmPQQzoJewxsmRG5e4ks5nl5mmgaJpZM4DTzb1.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#r23611075"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>