title: Having trouble applying KNN
body: <p>I have a problem trying to use KNN
  I'm applying the training and tests fit and I'm getting this error:
  ValueError: Found input variables with inconsistent numbers of samples: [4482, 2015]</p>
  <p>Full error:</p>
  <p><a href="https://i.stack.imgur.com/oMM8x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oMM8x.png" alt="enter image description here" /></a></p>
  <p>The problem is that the dataframe has already been treated and is without any problem</p>
  <p><a href="https://i.stack.imgur.com/C6iiO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C6iiO.png" alt="enter image description here" /></a></p>
  <p>X_treino and y_treino shape:</p>
  <p><a href="https://i.stack.imgur.com/KHSDw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KHSDw.png" alt="enter image description here" /></a></p>
  <p>Im going to put here all the code sequence I made and that is giving an error at the end:</p>
  <pre><code>X = wines_class.drop(['color'], axis=1)
  y = wines_class['color']
  
  from sklearn.model_selection import train_test_split
  X_treino, y_treino, X_teste, y_teste = train_test_split(X, y, test_size=0.31, random_state=0)
  
  print(X.shape,y.shape)
  (6497, 12) (6497,)
  
  from sklearn.metrics import roc_auc_score
  from sklearn.metrics import confusion_matrix
  
  def class_pontos(clf, y_predito):
    acc_treino = clf.score(X_treino, y_treino)*100
    acc_teste = clf.score(X_teste, y_teste)*100
  
    roc = roc_auc_score(y_test, y_predito)*100
    vn, fp, fn, vp = confusion_matrix(y_test, y_predito).ravel()
    cm = confusion_matrix(y_teste, y_predito)
    Correto = vp + vn
    Incorreto = fp + fn
  
    return acc_treino, acc_teste, roc, Correto, Incorreto, cm
  
  #KNN
  
  from sklearn.neighbors import KNeighborsClassifier
  class_knn = KNeighborsClassifier()
  class_knn.fit(X_treino, y_treino)
  
  y_pred_knn = class_knn.predict(X_teste)
  
  print(class_pontos(class_knn, y_pred_knn))
  </code></pre>
  <p><a href="https://drive.google.com/drive/folders/18_sOSIZZw9DCW7ftEKuOG4aIzGXoasFe?usp=sharing" rel="nofollow noreferrer">Im sharing the csv here in this drive</a></p>