| Subject: | XploRe Application Guide |
| See XploRe: |
| Quantlet: | clust12 | |
| Description: | clusters with the k-means method | |
| Download: | clust12.xpl |
randomize(0)
x = normal(100, 4) ; generate random normal data
x1 = x - #(2,1,3,0)'
x2 = x + #(1,1,3,1)'
x3 = x + #(0,0,1,5)'
x = x1|x2|x3
b = ceil(uniform(rows(x)).*3) ; generate a random partition
{g, c, v, s} = kmeans(x, b, 100) ; apply k-means
b~g| Subject: | XploRe Application Guide |
| See XploRe: |