-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
input validation with shape (0,N>0) for RandomForestClassifier, DecisionTreeClassifier, others? #1793
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
This might be a silly question, but would you actually want to input (0,1) ? or is it just to be thorough and have an error message for the case? By the way, it bombs for (1,1) too ( .. so should that be included in the input validation? |
Your (1,1) shape works for me. It's just a nonsensical input that I had on accident and noticed the error message sucks. |
Okay I thought it was something like that :) |
Regarding the (1,1) case, here's my trace:
You can't reproduce this? 😕 |
Such tricky cases should be tested in in the common tests in my opinion. I My 2 cents. On 21 March 2013 11:36, Jaques Grobler notifications@github.com wrote:
|
So then these fellows should all be added to the input validation I guess. I'll have a look which other models also do this |
I'm still getting this error:
It appears that #1678 is refering to inputs of shape (1, n_features) where this is (0, n_features). Also there is #2293, but that also only checks (1, n_features). It would still be helpful to get a better error message for (0, n_features) |
Please try on the current master. I get:
|
shoot, I'm sorry. I saw the timestamps of all the comments well before On Fri, Mar 6, 2015 at 9:22 AM, Olivier Grisel notifications@github.com
|
No pbm. We should release more often ;P |
Also for decision trees:
The text was updated successfully, but these errors were encountered: