Error : ValueError :‘c’ argument has 1 elements, which is not acceptable for use with ‘x’ with size 200, ‘y’ with size 200.
please find the below corrected (right) code:
N = 200
gaussian_quantiles = sklearn.datasets.make_gaussian_quantiles
(mean=None, cov=0.7, n_samples=N, n_features=2, n_classes=2, shuffle=True, random_state=None)
X, Y = gaussian_quantiles
X, Y = X.T, Y.reshape(1, Y.shape)
Visualize the data
plt.scatter(X[0, :], X[1, :], c=Y, s=40, cmap=plt.cm.Spectral);
when I tried to Visualize the data get
ValueError but when I did little modification in code as below :
plt.scatter(X[0, :], X[1, :], c= Y.reshape(200,) , s=40, cmap=plt.cm.Spectral);
I don’t Understand Why ??