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
[MRG+1] Issue#5803 : Regression Test added #8112
Conversation
I don't think this failed before #5802's patch:
|
Unless I'm reading the old issue wrongly, isn't the output of the method of the |
I have used regression algorithms as classifiers for the test because only they return prediction values as float. |
@MechCoder sorry I didn't get you. |
When I run the test on my machine it does give the following error before the patch |
Really? Is the bug a function of numpy version?
|
What I have done is manually reverted the changes in the commit a161f2c since it was only a one line change. Then I ran the test and it failed as expected. Here is the error log. Traceback (most recent call last): Ran 14 tests in 2.368s FAILED (errors=1) |
I am waiting for your final response, meanwhile I may take up another issue if its okay? |
You're right. I can get that test to fail if I revert the patch. But now I'm confused as to why other tests aren't failing in the same situation. There are other tests performing hard voting, with weights, where I'm sorry that I don't know the code well, and this is exacerbated by a very poor description of the issue at #5802 and #5803; there is no changelog entry for #5802 to tell me what's fixed exactly, either. Could you please explain... and add a changelog entry? Thanks so much. |
I understand your dilemma. The test |
Oh, of course. And yet, I'm not sure that we should be admitting regressors here. Those regressors are not outputting ints, and an I'm glad I finally understand what's going on. In the future it would be appreciated if you made sure your PR description is explicit about what you're fixing (particularly if the issue description is lacking). |
How do you suggest I do it? I will need some guidance here on making an ill-behaved classifier. |
? |
I used this class as it is and it fulfills our need. It fails before the patch and works after it. Do I need to add more classifiers like this or just one is okay? |
just one is okay. but l will admit that I'm still not sure about us
allowing a classifier to return floats if given ints
On 12 Jan 2017 6:24 pm, "Aman Pratik" <notifications@github.com> wrote:
I used this class as it is and it fulfills our need. It fails before the
patch and works after it. Do I need to add more classifiers like this or
just one is okay?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8112 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEz69JJGb9OtRjYygpagcSuopdg37oCks5rRdUxgaJpZM4LVMpS>
.
|
What do you suggest I do? There seems to be no other way to make the test. |
I'm okay with using that. I might not call it Dodgy if I were you... but I would leave a comment that it is dubiously conforming to our API. |
I have made some changes, please have a look @jnothman. |
@jnothman I am waiting for the final reviews on this one, so that I can make the corrections soon as I wont be available for a week. |
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.
Again, I'm not sure we should care about this case, but this LGTM.
LGTM shall I merge? |
|
||
|
||
def test_predict_for_hard_voting(): | ||
# Test predictions array data type error |
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.
Unnecessary comment
LGTM +1 after removing the comment |
thx @glemaitre i'll remove the comment in master |
* Issue#5803 Regression Test added * Float predictions values used for testing * Custom Classifier used for test
* Issue#5803 Regression Test added * Float predictions values used for testing * Custom Classifier used for test
* Issue#5803 Regression Test added * Float predictions values used for testing * Custom Classifier used for test
* Issue#5803 Regression Test added * Float predictions values used for testing * Custom Classifier used for test
* Issue#5803 Regression Test added * Float predictions values used for testing * Custom Classifier used for test
* Issue#5803 Regression Test added * Float predictions values used for testing * Custom Classifier used for test
* Issue#5803 Regression Test added * Float predictions values used for testing * Custom Classifier used for test
* Issue#5803 Regression Test added * Float predictions values used for testing * Custom Classifier used for test
Fixes: #5803
Regression Test for testing the functioning of
predict
for hard voting.Tests whether the fix for
np.bincount
by changing the datatype ofpredictions
array toint
works properly.