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
Conversation
Co-authored-by: mathurinm <mathurinm@users.noreply.github.com>
…o solver_class
There was a problem hiding this 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!
There was a problem hiding this 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.
Apart from the very few comments left, LVGTM! |
Co-authored-by: Badr MOUFAD <65614794+Badr-MOUFAD@users.noreply.github.com>
skglm/solvers/anderson_cd.py
Outdated
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 |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
Thanks all ! |
No description provided.