Perform Dbscan Clustering and K means
I have a simple array of data. I need to perform dbscan clustering and k means based on the values in the array.detailed description below:
Array values are:
int[] numbers = { 28, 26, 27, 29, 26, 22, 27, 28, 28, 22, 28, 26, 27, 00, 30, 27, 25, 25, 29, 27, 26, 28, 29, 32, 26, 19, 28, 30, 33, 32, 00, 30, 30, 32, 28, 31, 30, 30, 29, 28, 33, 19, 18, 30, 32, 32, 25, 31, 31, 29, 29, 30, 28, 28 };
these values are actually in a table which looks like this:
I just need clusters of the array..
1) For DBSCAN: minimum points to form cluster: 2, the difference between two values(epsilon value) can be either 1 or 2(user entered). Clustering here is not based on distances.. Just difference between values. The above diagram is sample of DBSCAN clusters that I need.. I don't want them in diagram as I have done already the webpage.. just need algorithm for clusters
Material: In this case clustering is done on points, similarly I need on array values specified above. thanks
2) For kmeans the k=4, starting each cluster with each quadrant above...
Material: I came across many clustering code, but any code will be fine for me..