使用 R 中 bigmemory 包中的 bigkmeans 进行聚类?
我最近开始尝试 R 的 biganalytics 包。但是我遇到了一个问题...
我正在尝试运行 bigkmeans
,簇号约为 2000,例如 clust <- bigkmeans( mymatrix, center=2000)
但是,我收到以下错误:1:(10 + 2^k) 中的错误:结果向量太长
有人可以给我提示我在这里做错了什么吗?
I recently started experimenting with the biganalytics package for R. I ran into a problem however...
I am trying to run bigkmeans
with a cluster number of about 2000 e.g clust <- bigkmeans(mymatrix, centers=2000)
However, I get the following error:Error in 1:(10 + 2^k) : result would be too long a vector
Can someone maybe give me a hint what I am doing wrong here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
向量受到用于索引的类型的限制——有人讨论用双精度替换这个索引类型,但它还没有发生,而且不太可能发生,因为它可能会破坏很多现有的代码。
如果您的
k
非常大,您可能无法按照计划的方式执行此操作。Vectors are limited by the type used for the index -- there is/was some talk about replacing this index type by a double but it hasn't happen yet and is unlikely as it may break so much existing code.
If your
k
is really large, you may not be able to do this the way you had planned.