Repository navigation
ENH support sparse data input for QuantileRegressor - #21086
Conversation
|
@glemaitre |
|
Thanks @venkyyuvy It seems that the CIs are still not passing. Can you check what is the reason. Do not hesitate if it seems to be a tricky corner case. |
|
There is change in the coef value when alpha is 0 (between sparse and dense input). |
|
@venkyyuvy Does this error persist with BTW, the whatsnew entry should go into 1.1 instead of 1.0. |
|
sure. |
ogrisel
left a comment
There was a problem hiding this comment.
LGTM once the following comments have been addressed.
|
Tests are failing in 3 envs alone. I'm not able to reproduce that in my local. |
glemaitre
left a comment
There was a problem hiding this comment.
I merge main to see if the errors are still issued. Otherwise, I give a couple of comments.
lorentzenchr
left a comment
There was a problem hiding this comment.
Another round. I still need to look at the tests.
test cases for csc alone
There was a problem hiding this comment.
We need to decide which solver to allow for sparse input X. The 4 solvers "highs-ds", "highs-ipm", "highs", "interior-point" are possible.
Edit I, however, am in favor of starting with the highs* ones only.
I think, we should for sure add all highs solvers for sparse matrices as well as "interior-point" (in which case one needs to pass the extra option "sparse": True" in linprog). This then needs a test checking for a raised ValueError in the case of sparse input and solvers that don't support sparse.
lorentzenchr
left a comment
There was a problem hiding this comment.
Next iteration. The docstring of the parameter solver needs an update about which solvers support sparse input.
| @pytest.mark.parametrize( | ||
| "sparse_format", [sparse.csc_matrix, sparse.csr_matrix, sparse.coo_matrix] | ||
| ) | ||
| @pytest.mark.parametrize("solver", ["highs"]) |
There was a problem hiding this comment.
| @pytest.mark.parametrize("solver", ["highs"]) | |
| @pytest.mark.parametrize("solver", ["highs-ds", "highs-ipm", "highs", "interior-point"]) |
There was a problem hiding this comment.
for interior-point solver alone, the test cases are failing. can we allow only highs* solver as of now?
There was a problem hiding this comment.
Yes. But then we should raise a ValueError, if interior-point is used with sparse data and the docstring has to be updated.
There was a problem hiding this comment.
And add it to test_compatible_solver_sparse.
There was a problem hiding this comment.
error persist even if I set 'sparse': True in solver options.
lorentzenchr
left a comment
There was a problem hiding this comment.
LGTM. 2 final nitpicks.
@venkyyuvy Thanks for the endurance to finish this. Still, we need one more reviewer approval.
|
@glemaitre @agramfort @rth @TomDLT might be interested in giving a 2nd review approval. |
|
Maybe also @avidale? |
|
Thanks @lorentzenchr @glemaitre @ogrisel @avidale |
|
Thanks @venkyyuvy |
Reference Issues/PRs:
partially addresses #20132.
What does this implement/fix? Explain your changes.
Edit: This enables sparse
XforQuantileRegressorwith the highs* solvers.Any other comments?