2
$\begingroup$

I am trying to use the glmnet MATLAB package to train my elastic net model on some huge data. My features are of size 13200, and I have around 6000 samples of these. I directly tried to use lassoglm in MATLAB with these features and corresponding target taking cross validation to just 3 folds and alpha = 0.5. It's already 6 hours and it hasn't finished. I have to do it for several others as well.

Any suggestions what I should do?

$\endgroup$
  • $\begingroup$ This question appears to be off-topic because it is about just programming ... Better to ask it on stackoverflow and if you want to get an answer ... you need to provide a minimal code to re-produce the problem. $\endgroup$ – Stat May 31 '14 at 1:05
1
$\begingroup$

I am not an expert.

In R, I have got ( after 11 hours!!) : Warning message: from glmnet Fortran code - Convergence for 10th lambda value not reached after maxit=100000 iterations; solutions for larger lambdas returned.

So you might want to first set maxit very low and then investigate further.

Also I assume your data is in a sparse matrix?

| cite | improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ No it is not sparse $\endgroup$ – user34790 Aug 23 '13 at 11:49
1
$\begingroup$

Not sure about the matlab interface, but in the R version you can control the maximum number of non-zeros using dfmax. Try to set that to something small and see if it works. Also, alpha=0.5 leads to the elastic-net which will increase the number of non-zero variables in the model, try with a larger alpha.

| cite | improve this answer | |
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.