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

error #2

Open
muthupandyN opened this issue Jan 27, 2019 · 1 comment
Open

error #2

muthupandyN opened this issue Jan 27, 2019 · 1 comment

Comments

@muthupandyN
Copy link

Traceback (most recent call last):
File "C:\Users\muthupandy\AppData\Local\Programs\Python\Python35\myi.py", line 67, in
class_ = le.inverse_transform(model.predict(t_usr)[0])
File "C:\Users\muthupandy\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\preprocessing\label.py", line 273, in inverse_transform
y = column_or_1d(y, warn=True)
File "C:\Users\muthupandy\AppData\Local\Programs\Python\Python35\lib\site-packages\sklearn\utils\validation.py", line 797, in column_or_1d
raise ValueError("bad input shape {0}".format(shape))
ValueError: bad input shape ()

please help

@AdroitAnandAI
Copy link

Modify the code as below. It will work.

    class_ = le.inverse_transform(model.predict(t_usr))
    questionset = data[data['Class']==class_[0]]

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

2 participants