benchopt / benchmark_logreg_l2

Benchopt benchmark for L2-regularized Logistic Regression
https://benchopt.github.io
4 stars 16 forks source link

Add unpenalized logistic regression #47

Open lorentzenchr opened 1 year ago

lorentzenchr commented 1 year ago

The problem sets of logistic regression all have a penalty. It would be very interesting, at least to me, to add the zero penalty case.

Note: For n_features > n_samples, like the 20 news dataset, this is real fun (from an optimization point of view).

mathurinm commented 1 year ago

If n_features > n_samples Then it's likely that the data is perfectly separable and so the minimizer does not even exist, no? all algorithms go to infinity (at a log log speed)

@tomMoral what's our policy between 3 separate repos (L1, L2, no pen) or a single one with some solvers skipping configs?

lorentzenchr commented 1 year ago

If n_features > n_samples Then it's likely that the data is perfectly separable and so the minimizer does not even exist, no? all algorithms go to infinity (at a log log speed)

Not quite, the solution is just not unique. Then, a desirable property of the coefficients is to have minimum L2 norm among all solutions. But that is hardly ever promised by any solver.

mathurinm commented 1 year ago

hence there is no minimizer in that case (see discussion above equation 2 in https://arxiv.org/pdf/1710.10345.pdf).

Edit: it's still a very interesting problem

lorentzenchr commented 1 year ago

Thanks for the linked literature.

Since log(1 + exp(u)) > 0, a loss value of exactly 0 is unreachable.

A good implementation will reach a loss very close to zero, e.g. I got about n_samples * 1e-10 for the 20 news dataset.

mathurinm commented 1 year ago

Yes, the objective converges to 0, but the iterates are diverging (there is no minimizer, ie the argmin is empty and the min is an inf)

Badr-MOUFAD commented 11 months ago

I'm transferring the issue to benchmark_logreg_l2 as it seems to be less directly linked to benchopt.

agramfort commented 11 months ago

PR welcome :)

Message ID: @.***>