## Logistic regression
data(colon)
x <- colon$X
y <- colon$y
x_bm <- as.big.matrix(x, backingfile = "")
fit <- biglasso(x_bm, y, penalty = "lasso", family = "binomial")
coef <- coef(fit, lambda = 0.05, drop = TRUE)
coef[which(coef != 0)]
predict(fit, x_bm, type = "link", lambda = 0.05)[1:10]
predict(fit, x_bm, type = "response", lambda = 0.05)[1:10]
predict(fit, x_bm, type = "class", lambda = 0.1)[1:10]
predict(fit, type = "vars", lambda = c(0.05, 0.1))
predict(fit, type = "nvars", lambda = c(0.05, 0.1))
Run the code above in your browser using DataLab