title: KNN algorithm with GridSearchCV
body: <p>Im trying to create a KNN model with GridSearchCV but am getting an error pertaining to param_grid: &quot;ValueError: Invalid parameter classifier_leaf_size for estimator KNeighborsClassifier(). Check the list of available parameters with <code>estimator.get_params().keys()</code>.&quot;.</p>
  <pre><code>knn = KNeighborsClassifier()
  
  knn.fit(x_train, y_train)
  y_pred = knn.predict(x_test)
  
  scores = cross_val_score(knn, x_train, y_train, scoring='accuracy', cv=cv, n_jobs=-1)
  
  print('Training Accuracy - KNN Classification: ', knn.score(x_train, y_train))
  print('Testing Accuracy - KNN Classification', knn.score(x_test, y_test))
  
  plt.show()
  
  #classification report
  cr = classification_report(y_test, y_pred)
  print(cr, &quot;\n&quot;)
  </code></pre>
  <pre><code>#grid
  estimator_KNN = KNeighborsClassifier(algorithm='auto')
  knn_grid_set_up = {'n_neigbors': (1,10,1),
                     'classifier_leaf_size': (20,40,1), 'p': (1,2),
                     'classifier_weights': ('uniform', 'distance')
                     }
  
  grid_search_KNN = GridSearchCV(
      estimator=estimator_KNN,
      param_grid=knn_grid_set_up,
      scoring = 'accuracy',
      n_jobs = -1,
      cv = 5
  )
  knn_grid.fit(x_train, y_train)
  </code></pre>
  <p>What causes the error? I've read documentation, have tried various methods, but still can't understand what is going on</p>