-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Add option to use different solver to LinearRegression #14268
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
Comments
Can't we use |
I would be in favor of factoring the common code in a private helper function instead of having public estimators call into oneanother. |
+1 for avoid called other estimators in a fit function and rely on a
plain private function.
|
To summarize, this would involve the following tasks?
|
hi @rithvikrao yes, I think that sounds right; apart from 1 maybe? Where did you get that from? We already have a global option to control that and in general we want to check for finiteness. Only if there's redundant checks would we want to remove them. It's not entirely clear how easy 4 is, maybe starting with 3 would be good? |
Hi @amueller, sounds good, I'll work on 3 first. 1 came from the first comment in this issue - I believe that |
@rithvikrao sorry didn't see that from @ogrisel's original comment, you're right we can remove that check, that might even be the easiest first step. |
This is related to #22855. |
As reported in #13923 the currently used
scipy.linalg.lstsq
can be significantly slower thanRidge(solver="cholesky", alpha=0)
for tall dense X.We should also call
scipy.linalg.lstsq
withcheck_finite=False
as we already do input validation infit
.Also the
scipy.linalg.lstsq
function has an optionallapack_driver
that accepts the following options:'gelsd'
,'gelsy'
,'gelss'
. The default is'gelsd'
. Maybe we should expose the others in our API and benchmark them to see if it would make sense to change the default.Related issue for Ridge: #14269
The text was updated successfully, but these errors were encountered: