0
votes

While using:

grid_search.GridSearchCV(svm.SVC(), parameters).fit(x_train, y_train).predict(x)

I get the following error:

C:\Anaconda3\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)

How can i solve it?

Thanks

1
A DeprecationWarning is not an error. It just tells you that some features won't be available anymore in the versions to come - MMF

1 Answers

1
votes

What does your dataframe look like? It is probably due to the shape of x_train/x_test.