skglm icon indicating copy to clipboard operation
skglm copied to clipboard

ENH Issue a warning when solution found is null

Open PABannier opened this issue 2 years ago • 4 comments

Most non-expert users might not be familiar with the rescaling by n_samples for alpha. Issuing a warning when alpha > alpha_max and giving hints to the user (for instance by printing alpha_max) and informing the user of the scaling by n_samples would be a valuable addition.

PABannier avatar Oct 18 '22 20:10 PABannier

Do you see an easy way of computing alpha_max for non convex penalites ? Is it worth the cost and code complication ?

mathurinm avatar Oct 18 '22 20:10 mathurinm

No indeed. But I still think if we ambition to make skglm available for a larger audience (potentially including ML practicioners not really familiar with the inner workings of an optimizer), we should issue some form of warning or piece of information. A warning after convergence would be the least expensive solution for us.

PABannier avatar Oct 18 '22 20:10 PABannier

We'd need a flexible way, because we handle penalties such as IndicatorBox. What's the pathological case we want to warn again in this case?

For the record, sklearn fits an intercept by default. Talk about surprising behavior for the user.

mathurinm avatar Oct 18 '22 20:10 mathurinm

We could instead raise a warning when we exit the solver without having updated any coefficient

mathurinm avatar Apr 28 '23 14:04 mathurinm