Library: | xclust |
See also: | xcfcme |
Quantlet: | xchcme | |
Description: | Performs a hard c-means cluster analysis |
Usage: | {v,d,uu,clus}=xchcme(x,c,m,e) | |
Input: | ||
x | n x p matrix of n row points to be clustered | |
c | scalar the number of clusters | |
m | determines the fuzziness of clustering (m>1) | |
e | termination tolerance | |
Output: | ||
v | p x p matrix of cluster centers | |
d | n x p matrix of distance | |
uu | n x p matrix of result | |
clus | number of cluster |
library("xclust") z=read("butterfly.dat") x=z[,2:3] c=2 m=1 e=0.001 hcm=xchcme(x,c,m,e) ; apply hard-c-means clustering hcm.clus d=createdisplay(1,1) setmaskp(x,hcm.clus,hcm.clus+1,7) show(d,1,1,x) title="Hard-c-means for Butterfly Data" setgopt(d,1,1,"title", title)
Gives the partitions of membership functions and depicts the clusters based on these partitions.