title: TypeError: __init__() got an unexpected keyword argument 'madataset_iter'
body: <p>My question is about <strong>K-means clustering algorithm</strong>, I keep getting the error <em><code>TypeError: __init__() got an unexpected keyword argument 'madataset_iter'</code></em> <strong>{it was sorted out after correcting the typo error}</strong> when I try to visualize the clusters after fitting my dataset into the model. Below   my code:</p>
  
  <pre><code>##Fitting kmeans to the dataset with k=4
  km4=KMeans(n_clusters=4,init='k-means++', max_iter=300, n_init=10, random_state=0)
  y_means = km4.fit_predict(dataset)
  
  #Visualizing the clusters for k=4
  plt.scatter(dataset[y_means==0,0],dataset[y_means==0,1],s=50, c='purple',label='Cluster1')
  plt.scatter(dataset[y_means==1,0],dataset[y_means==1,1],s=50, c='blue',label='Cluster2')
  plt.scatter(dataset[y_means==2,0],dataset[y_means==2,1],s=50, c='green',label='Cluster3')
  plt.scatter(dataset[y_means==3,0],dataset[y_means==3,1],s=50, c='cyan',label='Cluster4')
  plt.scatter(km4.cluster_centers_[:,0], km4.cluster_centers_[:,1],s=200,marker='s', c='red', 
  alpha=0.7, label='Centroids')
  plt.title('Customer segments')
  plt.xlabel('Annual income of customer')
  plt.ylabel('Annual spend from customer on site')
  plt.legend()
  plt.show()
  </code></pre>
  
  <p>The new error i am getting is </p>
  
  <p>'TypeError: '(array([False, False, False, False, False, False, False, False, 
    False,'</p>