Using K-means clustering with Arduino

Iv done some data mining but not with the arduino directly, could it be a solution to send the data to a pc via serial in a CSV format and use something like Orange or to a file online, then connect to the URL in Orange ?
It has everything you will ever need for data mining, K-mean, Clustering, Predictive results, trends, Deep learning and so on, and it's very quick to use, takes under a minute.
Orange
Orange K-means

else, here's an example of K-means in C, your need to adapt it for the Arduino though, and may be to intensive for the 16Mhz chip, taking ages to find the results.

K-Means in C