Created
December 24, 2018 21:05
-
-
Save Laurae2/d89a89262d4a9bacee816e797ed08b07 to your computer and use it in GitHub Desktop.
Matrix size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set.seed(1) | |
N <- 500000 | |
p <- 100 | |
pp <- 25 | |
X <- matrix(runif(N * p), ncol = p) | |
betas <- 2 * runif(pp) - 1 | |
sel <- sort(sample(p, pp)) | |
m <- X[, sel] %*% betas - 1 + rnorm(N) | |
y <- rbinom(N, 1, plogis(m)) | |
tr <- sample.int(N, N * 0.90) | |
format(object.size(X[tr,]), units = "Mb") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment