-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[WIP] Common test for equivalence between sparse and dense matrices. #7590
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
Conversation
In the neighbors module, the tests should pass also with auto.... |
That the linear model classification outputs are different are a bit concerning to me... For SGD, maybe increasing the number of iterations might help. I'm confused by Perceptron and PassiveAgressive having different results... hum |
Might not get neibhbors passing with auto without merfging #5596 On 8 October 2016 at 04:09, Andreas Mueller notifications@github.com
|
@maniteja123 please change to [MRG] when you want reviews |
Hi, I have tried to debug the reason for the failure for |
you can sometimes get faster feedback by copying the error message in here |
|
Hi Joel, sorry I didn't paste it because it would send lengthy notifications to everyone. Will remember it from next time. As for the errors, most of them are non deterministic in terms of mismatch( I suppose it is due to random seed), but these 10 estimators are failing always. |
Well, it isn't necessary to post the entirety of them, but giving examples On 16 October 2016 at 18:23, Maniteja Nandana notifications@github.com
|
Can you try set |
Thanks @jnothman for the suggestion. I did try to set |
% name) | ||
raise | ||
except Exception: | ||
print("Estimator %s doesn't seem to fail gracefully on " |
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.
(This is being output when there's an AssertionError
, which is a bit yuck)
A lot of the linear models have different paths for sparse and dense data. For example, where Ridge's We might not be able to solve this problem. Ideally, we might want to show that sparse and dense data produce the same results under some parameter configuration, rather than the default. This, however, does not fit neatly in our common tests framework. |
Can you not have a list of per-class parameters when the default parameters are not appropriate to compare outputs with dense and sparse input matrices, i.e. something like: dense_vs_sparse_additional_params = {
'Ridge': {'solver': 'cholesky'}
...
} Then you would use |
That solution is okay, @lesteve, while we still don't really have solutions for extensible common testing. |
I'd like to take this issue for the sprint if no one is working on it |
Solves #1572
What does this implement/fix? Explain your changes.
The common test is to ensure results on sparse and dense matrices are identical
Any other comments?
Some failing tests in estimators of
linear_model
all of which have separate code paths for sparse and dense matrices. I am not aware of any difference with its working on sparse and dense matrices. Please do let me know if there is any reason for this. I too will try to look into the code path. Thanks.Notes
In
neighbors
module, the algorithm is set tobrute
for sparse matrices, but it isauto
by default. So, I have set the paramalgorithm
tobrute
so that the tests pass.