import Pycluster as PC
matrix=([ 0. , 1.47, 2.43, 3.44, 1.08],
[ 1.47, 0. , 1.5 , 2.39, 2.11],
[ 2.43, 1.5 , 0. , 1.22, 2.69],
[ 3.44, 2.39, 1.22, 0. , 3.45],
[ 1.08, 2.11, 2.69, 3.45, 0.])
cluster,medoids,error=PC.kmedoids(matrix,3)
print(cluster)
我在我的距离矩阵上应用kmedoids。当我打印数据的集群标签时,它在一个列表中显示一个组合数字25次。有时是2,25,26。有时是2,64,66。例如:(假设这是其中一个输出的统计)
^{2}$所以,我想知道为什么每次我运行我的程序时,标签号和项目号都会不断变化。在
每次都会得到不同的结果。在
簇数可能是髓样体的指标。你看过pycluster的源代码了吗?在
相关问题 更多 >
编程相关推荐