title: KFold Cross Validation for KNN Text Classifier in R
body: <p>I have created a text classifier which classifies comments into various categories such as </p>
  
  <pre><code>      Comment                          Category 
  Good Service provided                   Service
  Excellent Communication                 Communication
  </code></pre>
  
  <p>I have done classification using:</p>
  
  <pre><code> knn(modeldata[train, ], modeldata[test,] , cl[train], k =2, use.all = TRUE)
  </code></pre>
  
  <p>Now i want to evaluate this model using K-Fold Cross Validation. I am expecting a number which i can use to know if model is overfitting or underfitting etc</p>
  
  <p>I have used </p>
  
  <pre><code>knn.cv(modeldata[train, ], cl[train], k =2, use.all = TRUE)
  </code></pre>
  
  <p>But help of this command says it will return NA if model is confused. Please guide</p>