Using K-means clustering with Arduino

Hi everyone;

First thing, my apologies if this subject is not posted in the right forum section I'm new in this.

Currently im working in a project that involves analyzing data from some charts created with the information recorded with some LDR. The main challenge that im facing right now is to isolate or discriminate the data, filtering the information that I really need for the project, ie: all values equals or above 5 are valid and all values equals or lower to 3 are not, thats the idea. For that I want to use the k-means algorithm for clustering this data but I can't find it for Arduino which makes me think that I need to insert it manually in the code, so, I wanted to ask if there is some utility for Arduino that includes this algorithm so in the programming interfase I can call it like K-Means(....) or something similar?

Thanks for your time and disposition to help.

Best regards.

Hi acunap,

I'm also interested in using K-Means with an Arduino. Do you find a solution for that?

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 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