Blaze with Scikit Learn K-Means
<p>I am trying to fit Blaze data object to scikit kmeans function.</p>

<pre><code>from blaze import *
from sklearn.cluster import KMeans
data_numeric = Data('data.csv')
data_cluster = KMeans(n_clusters=5)
data_cluster.fit(data_numeric)
</code></pre>

<p>Data Sample:</p>

<pre><code>A  B  C
1  32 34
5  57 92
89 67 21
</code></pre>

<p>Its throwing error :</p>

<p><a href="http://i.stack.imgur.com/g3IBI.png."><img src="http://i.stack.imgur.com/g3IBI.png." alt="enter image description here"></a></p>

<p>I have been able to do it with Pandas Dataframe. Any way to feed blaze object to this function ?</p>

<p>I would suggest that you choose the number of clusters (K) to be much smaller than the number of training examples you have in your data set. It is not right to run the K-Means algorithm when the number of clusters you desire is greater than or equal to the number of training examples.
The error occurs when you try to pass the blaze object with an undesirable shape, to the KMeans function.
Please check : 
<a href="https://blaze.readthedocs.io/en/latest/csv.html" rel="nofollow">https://blaze.readthedocs.io/en/latest/csv.html</a></p>

python scikit-learn blaze