title: Fine Tune Model with Caret Package
body: <p>I am using CARET package to fine tune random forest mtry parameter. In the package, tunelength parameter can be used to automate search for best mtry parameter. But the problem is the "tunelength" works when i set minimum 2 folds in crossvalidation. It does not work when i do not want cross validation.</p>
  
  <pre><code>ctrl &lt;- trainControl(method = "cv", classProbs = TRUE, summaryFunction = twoClassSummary, number = 2)
  
  set.seed(2)
  trained &lt;- train(Y ~ . , data = mydata, method = "rf", ntree = 500, tunelength = 10, metric = "ROC", trControl = ctrl, importance = TRUE)
  </code></pre>
  
  <p>And do anyone know the default setting of tunelength? I mean which value of mtry , it would start with.</p>