Open rbhambriiit opened 5 years ago
ValueError: Expected 2D array, got 1D array instead: array=[-0.75417405 -0.43660962]. Reshape your data either using array.reshape(-1, 1) if your data has a single feature or array.reshape(1, -1) if it contains a single sample.
Works fine after modification:
my_array = np.array([xi, yj])
my_array = my_array.reshape(1, -1)
# print(my_array)
P[i, j] = clf.decision_function(my_array)
PS: Loved the talk https://www.youtube.com/watch?v=HC0J_SPm9co :)
There are few other observations:
Ipython 3D visualisations do not seem to work for me. I am using jupyterlab. I assume this has to do with the usage of latest jupyter packages instead of ipython.
======== import seaborn as sns; sns.set() I do not see this being really used. Even though we import it.
========
plot_svc_decision_function does not seem to be working
I am trying to follow along the notebook on
Supervised Learning In-Depth: Support Vector Machines