-
This is my code and error when I try to plot the decision bounndry on a traning and test set :- /usr/local/lib/python3.7/dist-packages/matplotlib/init.py in inner(ax, data, *args, **kwargs) /usr/local/lib/python3.7/dist-packages/matplotlib/cbook/deprecation.py in wrapper(*args, **kwargs) /usr/local/lib/python3.7/dist-packages/matplotlib/axes/_axes.py in scatter(self, x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, plotnonfinite, **kwargs) /usr/local/lib/python3.7/dist-packages/matplotlib/axes/_axes.py in _parse_scatter_color_args(c, edgecolors, kwargs, xsize, get_next_color_func) ValueError: 'c' argument has 800 elements, which is inconsistent with 'x' and 'y' with size 1000. This is my plot_decision_boundry:- if len(y_pred[0]) > 1: #plot the decision boundry |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey Parth, Thank you for sharing your code. What have you tried so far? It looks like there's a dimensional error for You might want to make sure you're using the right
Think about what the input to the function is, |
Beta Was this translation helpful? Give feedback.
Hey Parth,
Thank you for sharing your code.
What have you tried so far?
It looks like there's a dimensional error for
c
.You might want to make sure you're using the right
x
value for this line:Think about what the input to the function is,
x
orX
(lowercase or capital).