I need to partition a bivariate data set into predetermined "n" clusters and, at the same time, to fix the centroid position of each cluster. Is the ClusteringComponents function useful?
Thanks BR for your help. I will use your example to explain better my question I want to Split your “data” into two (n=2) clusters. Previously, I want to fix the coordinate (centroids) of the two clusters.
data = With[{ρ = -0.4},
RandomVariate[BinormalDistribution[{-1, 1}, {1, 2}, ρ], 10000]];
FIXEDcentroids = {{-2, 0}, {0.5, -0.4}};
Show[ListPlot[data, Frame -> True, Axes -> False],
ListPlot[FIXEDcentroids, Frame -> True, PlotStyle -> {Black, PointSize[0.02]}]]
The next step should be to "force" the clustering process to split the “data” set according the position of the two predefined centroids.
If I use the FindCluster traditional form:
NumberOfCluster = 2;
clusterdata = FindClusters[data, NumberOfCluster];
I obtained two new centroids.
centroidFindClusters = Mean[#] & /@ clusterdata
Obviously the two new centroids are differents from those that I preselected (i.e. FIXEDcentroids). Therefore I am not able to solve my problem....
...if were possible to write:
FindClusters[data, FIXEDcentroids] it would be perfect......





FindClustersfunction. – Verbeia Sep 13 '12 at 07:52FIXEDcentroids? – Simon Woods Sep 13 '12 at 15:45Read the FAQs! 3) When you see good Q&A, vote them up byclicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. ALSO, remember to accept the answer, if any, that solves your problem,by clicking the checkmark sign` – Vitaliy Kaurov Sep 13 '12 at 18:59