Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT - Add alpha_max methods to estimators #240

Open
QB3 opened this issue Apr 3, 2024 · 2 comments
Open

FEAT - Add alpha_max methods to estimators #240

QB3 opened this issue Apr 3, 2024 · 2 comments
Labels
enhancement New feature or request needs discussion

Comments

@QB3
Copy link
Collaborator

QB3 commented Apr 3, 2024

Description of the feature

In multiple issues, it seems that practitioners had problems selecting the regularization parameter alpha, and a lot of them do not know the value of alpha_max.
Maybe we could implement an alpha_max method for popular estimators.

@Badr-MOUFAD Badr-MOUFAD added enhancement New feature or request needs discussion labels Apr 3, 2024
@mathurinm
Copy link
Collaborator

We have them for some penalties : https://github.com/scikit-learn-contrib/skglm/blob/main/skglm/penalties/separable.py#L206

It regularly pops up because people are not aware of this and use an alpha_max that way too small. I don't know how to fix this in a unified fashion (it does not apply to L2 regularized problems for example).
I think having an example to point to, at least, would make answering the same question repeatedly easier.

@mathurinm mathurinm changed the title FEAT - Add alpha_max mehods? FEAT - Add alpha_max methods to estimators May 31, 2024
@QB3
Copy link
Collaborator Author

QB3 commented Jun 3, 2024

From a user point of view, I would see a function estimator.get_alpha_max(X, y), with

def get_alpha_max(X, y):
      return self.penalty.dual(X.T @ self.fdatafit.rawgrad(y, 0))

To me, this is unclear how to do it without repeating this chunk of code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs discussion
Projects
None yet
Development

No branches or pull requests

3 participants