title: what is the fundamental solution for Error in knn: too many ties in knn
body: <p>Hope this finds you well, I am applying Knn model in the data landsat, and I have this error:</p>
  
  <pre><code>Error in knn(learn[, -1], test[, -1], learn[, 1], k = 1) : 
    too many ties in knn.
  </code></pre>
  
  <p>however I reduce the number of neighborhood to 1. could any one help me. 
  Thanks in advance.</p>