glum icon indicating copy to clipboard operation
glum copied to clipboard

Allow setting `max_inner_iter` passed to `enet_coordinate_descent_gram`

Open mlondschien opened this issue 1 year ago • 0 comments

This is set here. Reducing this to a more reasonable number such as 1000 results in much faster convergence and fewer warnings

/cluster/customapps/biomed/grlab/users/lmalte/mambaforge/envs/icufm/lib/python3.10/site-packages/glum/_solvers.py:58: ConvergenceWarning: Coordinate descent did not converge. You might want to increase the number of iterations. Minimum norm subgradient: nan, tolerance: 0.0010000000474974513
  new_coef, gap, _, _, n_cycles = enet_coordinate_descent_gram(1036083102226]

although many more warnings

/Users/mlondschien/code/glum/src/glum/_solvers.py:58: ConvergenceWarning: Coordinate descent did not converge. You might want to increase the number of iterations. Minimum norm subgradient: 0.04440617933869362, tolerance: 0.0061285351403057575
  new_coef, gap, _, _, n_cycles = enet_coordinate_descent_gram(

(0.04 is much better than nan).

It would be nice to figure out why enet_coordinate_descent_gram does not converge in the insane amount of iterations max_inner_iter=100_000 but rather returns infinite values. Shouldn't the hessian be positive definite, in particular, if P2 != 0?

mlondschien avatar Sep 26 '24 07:09 mlondschien