【发布时间】:2016-01-09 18:52:44
【问题描述】:
我正在尝试创建我的数据集块来运行biglm。 (使用 fastLm 我需要 350Gb 的 RAM)
我的完整数据集称为res。作为实验,我将大小大幅减少到 10.000 行。我想创建与 biglm 一起使用的块。
library(biglm)
formula <- iris$Sepal.Length ~ iris$Sepal.Width
test <- iris[1:10,]
biglm(formula, test)
不知何故,我得到以下输出:
> test <- iris[1:10,]
> test
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
1 5.1 3.5 1.4 0.2 setosa
2 4.9 3.0 1.4 0.2 setosa
3 4.7 3.2 1.3 0.2 setosa
4 4.6 3.1 1.5 0.2 setosa
5 5.0 3.6 1.4 0.2 setosa
6 5.4 3.9 1.7 0.4 setosa
7 4.6 3.4 1.4 0.3 setosa
8 5.0 3.4 1.5 0.2 setosa
9 4.4 2.9 1.4 0.2 setosa
10 4.9 3.1 1.5 0.1 setosa
您可以在上面看到矩阵test 包含10 行。然而,当运行 biglm 时,它显示的样本大小为 150
> biglm(formula, test)
Large data regression model: biglm(formula, test)
Sample size = 150
看起来它使用 iris 而不是 test.. 这怎么可能?如何让 biglm 以我想要的方式使用 chunk1?
【问题讨论】:
-
我将代码更新为可重现的示例
标签: r assign lm chunks chunking