Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有分类变量的数据集,级别数很丑(5000 左右)。当我运行我的代码以转换为虚拟变量时,它说它需要 22 gigs 的内存并崩溃
dmy <- dummyVars(" ~ .", data = num_data) new_data <- data.frame(predict(dmy, newdata = num_data))
在这种情况下我该怎么办?寻求云解决方案?尝试优化功能?
是的,试试sparse.model.matrix
sparse.model.matrix
或者扩展你的内存限制
memory.limit(10*memory.limit())