large-scale regression in R with a sparse feature matrix

前端 未结 4 788
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-08 05:37

I\'d like to do large-scale regression (linear/logistic) in R with many (e.g. 100k) features, where each example is relatively sparse in the feature space---e.g., ~1k non-ze

4条回答
  •  佛祖请我去吃肉
    2020-12-08 06:11

    A belated answer: glmnet will also support sparse matrices and both of the regression models requested. This can use the sparse matrices produced by the Matrix package. I advise looking into regularized models via this package. As sparse data often involves very sparse support for some variables, L1 regularization is useful for knocking these out of the model. It's often safer than getting some very spurious parameter estimates for variables with very low support.

提交回复
热议问题