A reimplementation of the fastLm function of RcppEigen for big.matrix objects for fast out-of-memory linear model fitting
C++ R C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
docs
man
src
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
NAMESPACE
NEWS.md
README.md
appveyor.yml
cran-comments.md

README.md

bigFastlm version

A reimplementation of the fastLm functionality of RcppEigen for big.matrix objects for fast out-of-memory linear model fitting

Build Status

OS Build
Linux x86_64 Build Status
Windows x86_64 Appveyor Build Status

Installation

Install using the devtools package (RcppEigen and bigmemory must be installed first as well):

devtools::install_github("jaredhuling/bigFastlm")

Usage

library(bigFastlm)
library(bigmemory)

nrows <- 50000
ncols <- 50
bkFile <- "bigmat.bk"
descFile <- "bigmatk.desc"
bigmat <- filebacked.big.matrix(nrow=nrows, ncol=ncols, type="double",
                                backingfile=bkFile, backingpath=".",
                                descriptorfile=descFile,
                                dimnames=c(NULL,NULL))

set.seed(123)
for (i in 1:ncols) bigmat[,i] = rnorm(nrows)*i

y <- rnorm(nrows) + bigmat[,1]

system.time(lmr1 <- bigLm(bigmat, y))

summary(lmr1)

predictions <- predict(lmr1, newdata = bigmat)