komdes函数:kmodes(data, modes, iter.max = 10, weighted = FALSE)
它的输入参数里, weighted表示给属性赋权值的意思吗?如果我有10个属性,想给每个属性赋权重应该怎么操作呢?
我是这么输入的: kmodes(data,10,10,rep(0.1,10))
结果报错了:
Error in n_obj[i] <- weight[which(names == obj[different[i]])] :
replacement has length zero
In addition: Warning message:
In if (weighted) { :
the condition has length > 1 and only the first element will be used
但是我不知道该怎么做,麻烦各位指点下。。


雷达卡





京公网安备 11010802022788号







