0
我是一名IDL初学者,我想知道是否可以在IDL中获得一些帮助。我在Harris Geospatial上找到了一个很好的例子来解释这个方法,但是我对如何在我自己的数据上运行集群(ASCII)来执行K均值分析感到困惑。我如何使用而不是产生随机数
下面是我对哈里斯发现代码中的“随机”功能我的数据:IDL中的K均值聚类
n = 50
c1 = RANDOMN(seed, 3, n)
c1[0:1,*] -= 3
c2 = RANDOMN(seed, 3, n)
c2[0,*] += 3
c2[1,*] -= 3
c3 = RANDOMN(seed, 3, n)
c3[1:2,*] += 3
array = [[c1], [c2], [c3]]
; Compute cluster weights, using three clusters:
weights = CLUST_WTS(array, N_CLUSTERS = 3)
; Compute the classification of each sample:
result = CLUSTER(array, weights, N_CLUSTERS = 3)
谢谢。