seqdist中的内存瓶颈?

时间:2016-01-28 12:34:50

标签: r sequence traminer

seqdist()中是否存在内存瓶颈?

我是一名研究员,在拥有64 GB内存的Windows x64计算机上使用注册数据。我们的数据由60,000人组成,目前我处理的数据大约有220万行SPELL格式。我无法在其上运行seqdist(方法=" OM",indel = 1,sm =" TRATE",with.missing = TRUE,full.matrix = FALSE),错误消息与in here相同,其中重要部分似乎指向不够大的内存:"不允许负长度向量"。

好的,但是seqdist()似乎并没有利用我的整个RAM。现在我在40,000人的样本上运行它,似乎经历了,但R使用的内存不到2 gbs。如果我对60,000人运行seqdist(),我会收到错误。

某处可能有2 ^ 31-1的大小限制吗?

计算病房群集很容易利用所有可用的RAM。我已经使用了高达40 GB的RAM,至少证明R能够利用大量的RAM。

编辑:最大案例数正好是46341.警告但是,如果大小< = 46341,则会占用内存。 例如:

library(TraMineR)

id <- seq(from=1, to=46342, by=1)
set.seed(234324)
time1 <- sample(seq(from=1, to=3, by=1), size=46342, replace=TRUE)
time2 <- sample(seq(from=1, to=3, by=1), size=46342, replace=TRUE)
time3 <- sample(seq(from=1, to=3, by=1), size=46342, replace=TRUE)

testdata <- data.frame(id, time1, time2, time3)

testseq <- seqdef(testdata, 2:4)

testdist <- seqdist(testseq, method="OM", indel=1, sm="TRATE", full.matrix=FALSE)

0 个答案:

没有答案
相关问题