Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: TheoHello again. This will be a bit tricky to describe.
I need some help concerning a clustering algorithm (2-d/Cartesian x-y coordinates) I am trying to set up.
The basic thinking process/principle behind it can be found here:
en.wikipedia.org/wiki/K-means_clustering
I had initiated some attempts which led me to a very rough outcome presented in the attached graph.
Clusterization_JA.brg
I would like to request some additional help for the development of the following (which is not included in my graph yet):
1) I would eventually like to make a dynamic iterative process that when a new static point (cartesians x,y) is assigned to an existing cluster via a criterion
(usually Euclidian Distance between the cluster Centroid and the point itself), all the cluster's centroids are recalculated and all past-processed points are re-assigned until no other point
(from the already processed ones) will be changed. From then on, one new point will be inserted in the processing algorithm and the aforementioned step will have to be executed again.
let me formulate an example.
When I have a set of e.g. 3 clusters (with their respective Centroids and their coordinates set) and I have already assigned 1 point to one of them (e.g. Cluster 1),
when I process the second one and initially assign it to e.g. cluster 2, this cluster's centroid coordinates will have to change accordingly. Before proceeding to the next static point
(Point 3), I want to check if the previously processed static Point (Point 1) does still belong to Cluster1 or it is now closer to (new)Cluster2. If the latter happens, then assign it to
(new)Cluster2 and iterate the process until no other point from the already processed (Point 1 and Point 2 so far) needs to move to another cluster.
Then Proceed with Point 3.
[iterate]
2) In the provided graph I have some arbitrarily set clusters' centroids.
At the first branch I have set as the Clusters' initial Centroid the first i (where i=user defined cluster number) Points and proceeded with the processing of the rest.
At the second branch I have derived the Min and Max of the Given Points' Coordinates (X,Y) and create the relevant centroids with the formula CENTROIDi((MAXC-MINX)/i,(MAXy-MINy)/i)
3) I would eventually like to create a form of Bubble+Scatter Diagram with bubbles representing clusters (and their size will be analogous to the number of points they contain) and scatter points representing the Initially Given (X-Y coordinates) Points.
That was all,
Thank you in advance and please forgive me for the long post.