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

01 - Introduction second cell fives deprecation warning #6

Open
BenjaminKay opened this issue Dec 15, 2015 · 1 comment
Open

01 - Introduction second cell fives deprecation warning #6

BenjaminKay opened this issue Dec 15, 2015 · 1 comment

Comments

@BenjaminKay
Copy link

Code:

# Import the example plot from the figures directory
from figures import plot_sgd_separator
plot_sgd_separator()

Gives the warning:

C:\anaconda\lib\site-packages\sklearn\utils\validation.py:386: DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and willraise ValueError in 0.19. Reshape your data either using X.reshape(-1, 1) if your data has a single feature or X.reshape(1, -1) if it contains a single sample.

DeprecationWarning)

The error is repeated many times. The figure does load properly despite these warnings.

@rbhambriiit
Copy link

I also faced an error while running this block.
This error was along the lines of a list not having a shape attribute.

Fix:
p = clf.decision_function(np.array([x1, x2]).reshape(1, -1))

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