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

API transform solver functions into classes #63

Merged
merged 87 commits into from Sep 13, 2022

Conversation

mathurinm
Copy link
Collaborator

No description provided.

skglm/estimators.py Outdated Show resolved Hide resolved
skglm/estimators.py Outdated Show resolved Hide resolved
@mathurinm mathurinm changed the title Transform solver functions into classes API transform solver functions into classes Aug 31, 2022
skglm/estimators.py Outdated Show resolved Hide resolved
skglm/estimators.py Outdated Show resolved Hide resolved
skglm/estimators.py Outdated Show resolved Hide resolved
skglm/estimators.py Outdated Show resolved Hide resolved
skglm/estimators.py Outdated Show resolved Hide resolved
skglm/estimators.py Outdated Show resolved Hide resolved
skglm/estimators.py Outdated Show resolved Hide resolved
skglm/estimators.py Outdated Show resolved Hide resolved
skglm/penalties/__init__.py Outdated Show resolved Hide resolved
skglm/solvers/__init__.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@QB3 QB3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outstanding work guys, thanks you so much!

skglm/solvers/prox_newton.py Show resolved Hide resolved
skglm/solvers/accelerated_cd.py Outdated Show resolved Hide resolved
skglm/tests/test_estimators.py Show resolved Hide resolved
try_solver.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Badr-MOUFAD Badr-MOUFAD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats team for the hard work! That's a big nicely done PR!

I did a first pass. Some minor remarks.

skglm/solvers/anderson_cd.py Show resolved Hide resolved
skglm/solvers/base.py Show resolved Hide resolved
skglm/solvers/base.py Show resolved Hide resolved
skglm/solvers/gram_cd.py Show resolved Hide resolved
skglm/solvers/multitask_bcd.py Outdated Show resolved Hide resolved
skglm/solvers/prox_newton.py Outdated Show resolved Hide resolved
skglm/solvers/base.py Show resolved Hide resolved
@QB3
Copy link
Collaborator

QB3 commented Sep 9, 2022

Apart from the very few comments left, LVGTM!

mathurinm and others added 2 commits September 9, 2022 06:34
Co-authored-by: Badr MOUFAD <65614794+Badr-MOUFAD@users.noreply.github.com>
raise ValueError(
'Unsupported value for self.ws_strategy:', self.ws_strategy)
n_samples, n_features = X.shape
w = np.zeros(n_features) if w_init is None else w_init
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a missing self.fit_intercept here, right? Though we pass the tests!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test that makes this break and then fix the faulty code ?

Copy link
Collaborator Author

@mathurinm mathurinm Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But then again. This PR should not modify the behavior of the algorithm, only the API. So it should be done in another PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't break when fitting an estimator since we use _glm_fit function that passes in a w_init.
However, it breaks when using directly AndersonCD solver.
I fixed that. yet, I don't think it deserves to be added as a unitest. WDYT @mathurinm?

@mathurinm mathurinm merged commit 19a5a6f into scikit-learn-contrib:main Sep 13, 2022
@mathurinm
Copy link
Collaborator Author

Thanks all !
This can break existing code and we did not use a deprecation cycle, so let's keep an eye out especially for benchopt benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants