I have a dataset which has about 1000 features and about 30,000 rows. Most of the data is 0's. I am currently storing this information in a sparse matrix. Now what I would like to do is perform column wise logistic regression - each feature vs the dependent variable.
My question is how do you perform logistic regression on sparse matrices.I stumbled into the glmnet package but that requires minimum 2 columns. Here is some sample code
require(glmnet)
x = matrix(rnorm(100*1),100,1)
y = rnorm(100)
glmnet(x,y)
This gives me an error. I was wondering if there is any other package that I might have missed?
Any help will be appreciated. Thanks all
lappy? Would that be of use? - LyzandeR