Skip to content
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

Too many indices For Array #92

Open
Bhisham-Sharma opened this issue Aug 19, 2018 · 4 comments
Open

Too many indices For Array #92

Bhisham-Sharma opened this issue Aug 19, 2018 · 4 comments

Comments

@Bhisham-Sharma
Copy link

I am facing IndexError but i don't know why as my train and test set are in perfect shape as required by cross_val_score but still im getting this error. Any suggestions ?

K-NN for Amazon Fud Review.html.pdf

@Bhisham-Sharma
Copy link
Author

check the file above in link and please help me solve this problem

@mhbw
Copy link

mhbw commented Mar 28, 2019

having the same problem actually, can't figure out why.

@Bhisham-Sharma
Copy link
Author

I solved this problem already long ago. Actually the shape of y_labels (which is polarity_train in my PDF I provided) is not in the required shape. Either it should (1400,1) or just list of 1400 class labels. As it's in array, because I used polarity_train.shape, so it should be in two dimensional. Just reshape your class labels to (1400,1) or use list of class labels. Hope it will solve too many indices problem in this case

@XT-Tahoe
Copy link

XT-Tahoe commented Dec 6, 2019

I also meet with this problems. I can't solve it no matter how I change the shape of data I used. Please tell me how to solve it if you truly solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants