R:multinom。大量内存但仍然会出现内存错误

时间:2017-04-06 04:18:15

标签: r multinomial

我使用64位R(不是RStudio) 我收到以下错误:

  
    

nounsResults< - multinom(Major1~。,data = nouns,MaxNWts = 120000)     重量:101332(100521变量)     错误:无法分配大小为512 Kb的向量

  

但我有足够的内存可用: enter image description here

我的代码是R中多项逻辑回归的第一次尝试 (多次gc()调用是我的恐慌)

    library(foreign)
library(nnet)
library(ggplot2)
library(reshape2)

sink("C:\\Users\\xxx\\Dropbox\\__xx\\datafiles\\OutputR.txt", append=FALSE, split=TRUE)
gc()
memory.limit()


options(max.print=1000000)

nouns <- read.csv("C:\\Users\\xxx\\Dropbox\\__xx\\datafiles\\nouns-categorical_R1.csv")


#sapply(nouns,function(x) sum(is.na(x)))
gc()

nouns$Major1<-relevel(nouns$Major0, ref="ACCOUNTING")
nouns$Major1
gc()
nounsResults <- multinom(Major1 ~ ., data = nouns, MaxNWts=120000)
gc()
nounsResults

0 个答案:

没有答案