airoldilab / sgd

An R package for large scale estimation with stochastic gradient descent
62 stars 18 forks source link

Cannot use SGD with sparse matrix #90

Open jeffwong-nflx opened 7 years ago

jeffwong-nflx commented 7 years ago

Hi, great package! I noticed that you can only use the sgd(x = ..., y = ...) interface if x is either a big matrix or a matrix, but not a sparse matrix as in the result of sparse.model.matrix. This support would be great

ptoulis commented 7 years ago

thanks Jeff! Indeed, working on sparse models is a priority.

jeffwong-nflx commented 7 years ago

Since you are using RcppArmadillo, the equivalent class would be a arma::sp_mat instead of arma::mat. Is it just a matter of changing the Rcpp interfaces ? If so I could help with that

ptoulis commented 7 years ago

@dustinvtran would this change interfere with any changes you are currently implementing?

dselivanov commented 7 years ago

Duplicate #85

dustinvtran commented 7 years ago

apologies for the (very) delayed response; from a cursory glance it would be as simple as changing those classes.