【发布时间】:2013-09-28 20:02:10
【问题描述】:
我需要访问 R 中 cclust 包的函数 clustIndex。 函数原型如下:
clustIndex ( y, x, index = "all" )
y Object of class "cclust" returned by a clustering algorithm such as kmeans
x Data matrix where columns correspond to variables and rows to observations
index The indexes that are calculated "calinski", "cindex", "db", "hartigan",
"ratkowsky", "scott", "marriot", "ball", "trcovw", "tracew", "friedman",
"rubin", "ssi", "likelihood", and "all" for all the indexes. Abbreviations
of these names are also accepted.
y 是从同一个包中的函数 cclust 生成的对象,但我有一个在 Matlab 中编码的聚类算法,并且想使用这个函数 clustIndex 使用 matlab 中算法产生的解决方案来计算索引。
我能想到的一种方法是创建一个 cclust 对象并使用我的解决方案填充其变量的值,然后使用它。这会正确/有效吗? 包的文档可用here
还有其他想法可以使用吗?
【问题讨论】:
标签: r matlab interface cluster-analysis