<p>Okay, I finally had a chance to look through this more thoroughly (my schedule has cleared up a bit, and I can now focus on getting this done).  I went through and made several changes, but it was unclear to me how I might commit to your particular branch, so what I did instead is post my patches to <a href="http://www.ratml.org/misc/patches.zip">http://www.ratml.org/misc/patches.zip</a>.  You can unzip the patches, then 'git am *.patch' to apply them to your branch.  It's mostly formatting/style cleanups, but there are a few speedups there.</p>

<p>However, what kept me from saying "okay, we're good to go" is that the scikit implementation of mean shift is an order of magnitude faster or more.  I used the following test script for scikit:</p>

<pre><code>import numpy
from sklearn.cluster import MeanShift, estimate_bandwidth

d = numpy.genfromtxt('/path/to/dataset.csv', delimiter=',')
bw = estimate_bandwidth(d, quantile=0.2, n_samples=500)

print(bw)

ms = MeanShift(bandwidth=bw, bin_seeding=True)
ms.fit(d)

print(ms.cluster_centers_)
print(len(numpy.unique(ms.labels_)))
</code></pre>

<p>And then I would use the printed bandwidth with the <code>mean_shift</code> program.  Could you please look into why the implementation for mlpack is so slow comparatively?</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#issuecomment-87055142">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFGq824rjZxVa4b4CRo94bVu16sv7ks5n5Z-VgaJpZM4DTzb1.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#issuecomment-87055142"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>