I have a simple two-dimensional data set that I want to copy in an agglomerative way (without knowing the optimal number of clusters used). The only way I was able to group my data was to set the function to "maxclust".
For simplicity, let's say this is my dataset:
X=[ 1,1; 1,2; 2,2; 2,1; 5,4; 5,5; 6,5; 6,4 ];
Naturally, I would like this data to form 2 clusters. I understand that if I knew this, I could just say:
T = clusterdata(X,'maxclust',2);
and to find which points fall into each cluster, I could say:
cluster_1 = X(T==1, :);
and
cluster_2 = X(T==2, :);
but not knowing that 2 clusters will be optimal for this data set, how do I group this data?
thanks
source share