Description Usage Arguments Value Examples
Prediction method for bigLm fitted objects
1 2 |
object |
fitted "bigLm" model object |
newdata |
big.matrix object. If NULL, then fitted values are returned |
... |
not used |
An object depending on the type argument
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | library(bigmemory)
nrows <- 50000
ncols <- 50
bkFile <- "bigmat3.bk"
descFile <- "bigmatk3.desc"
bigmat <- filebacked.big.matrix(nrow=nrows, ncol=ncols, type="double",
backingfile=bkFile, backingpath=".",
descriptorfile=descFile,
dimnames=c(NULL,NULL))
# Each column value with be the column number multiplied by
# samples from a standard normal distribution.
set.seed(123)
for (i in 1:ncols) bigmat[,i] = rnorm(nrows)*i
y <- rnorm(nrows) + bigmat[,1]
system.time(lmr1 <- bigLm(bigmat, y))
preds <- predict(lmr1, newdata = bigmat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.