title: trainControl in caret package
body: <p>In caret package, there is a thing called trainControl that allow us to perform variety of cross validation. To perform 10-fold cross-validation, one would use</p>
  
  <pre><code>fitControl &lt;- trainControl(method= "repeatedcv", number = 10, repeats = 10)
  fitJ48_10_fold &lt;- train(x = x, y =y, method = "J48", trControl= fitControl)
  </code></pre>
  
  <p>while for training set, it is </p>
  
  <pre><code>fitControl &lt;- trainControl(method= "none")
  fitJ48train &lt;- train(x = x, y =y, method = "J48", trControl= fitControl)
  </code></pre>
  
  <p>However, confusion matrix of these model show the same for both 10-fold and training.</p>
  
  <pre><code>Activity &lt;- predict(fitJ48_10_fold, newdata = Train)
  confusionMatrix(Activity, Train$Activity)
  
  Activity &lt;- predict(fitJ48train, newdata = Train)
  confusionMatrix(Activity, Train$Activity)
  </code></pre>
  
  <p>I used the weka classifier GUI and indeed the performance of J48 from 10-fold cross validation is lower than that of training set. Am I wrong to suspect that the trainControl from caret isn't working or I pass this in a wrong way?</p>