【发布时间】:2017-06-30 08:02:14
【问题描述】:
我是 IDL 初学者,我想知道是否可以就 IDL 中的集群获得一些帮助。我在 Harris Geospatial 上找到了一个很好的例子来解释该方法,但是,我对如何在我自己的数据 (ASCII) 上运行聚类以执行 K 均值分析感到困惑。如何使用我的数据而不是生成随机数的“随机”函数
以下是我在 Harris 上找到的代码:
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)
谢谢。
【问题讨论】:
标签: cluster-analysis k-means idl-programming-language