title: Using adaboost within R's caret package
body: <p>I've been using the <code>ada</code> R package for a while, and more recently, <code>caret</code>. According to the documentation, <code>caret</code>'s <code>train()</code> function should have an option that uses ada.  But, caret is puking at me when I use the same syntax that sits within my <code>ada()</code> call.</p>
  
  <p>Here's a demonstration, using the <code>wine</code> sample data set.</p>
  
  <pre><code>library(doSNOW)
  registerDoSNOW(makeCluster(2, type = "SOCK"))
  library(caret)
  library(ada)
  
  wine = read.csv("http://www.nd.edu/~mclark19/learn/data/goodwine.csv")
  
  
  set.seed(1234) #so that the indices will be the same when re-run
  trainIndices = createDataPartition(wine$good, p = 0.8, list = F)
  wanted = !colnames(wine) %in% c("free.sulfur.dioxide", "density", "quality",
                              "color", "white")
  
  wine_train = wine[trainIndices, wanted]
  wine_test = wine[-trainIndices, wanted]
  cv_opts = trainControl(method="cv", number=10)
  
  
   ###now, the example that works using ada() 
  
   results_ada &lt;- ada(good ~ ., data=wine_train, control=rpart.control
   (maxdepth=30, cp=0.010000, minsplit=20, xval=10), iter=500)
  
  ##this works, and gives me a confusion matrix.
  
  results_ada
       ada(good ~ ., data = wine_train, control = rpart.control(maxdepth = 30, 
       cp = 0.01, minsplit = 20, xval = 10), iter = 500)
       Loss: exponential Method: discrete   Iteration: 500 
        Final Confusion Matrix for Data:
        Final Prediction
        etc. etc. etc. etc.
  
  ##Now, the calls that don't work. 
  
  results_ada = train(good~., data=wine_train, method="ada",
  control=rpart.control(maxdepth=30, cp=0.010000, minsplit=20, 
  xval=10), iter=500)
     Error in train.default(x, y, weights = w, ...) : 
     final tuning parameters could not be determined
     In addition: Warning messages:
     1: In nominalTrainWorkflow(dat = trainData, info = trainInfo, method = method,  :
      There were missing values in resampled performance measures.
     2: In train.default(x, y, weights = w, ...) :
      missing values found in aggregated results
  
   ###this doesn't work, either
  
  results_ada = train(good~., data=wine_train, method="ada", trControl=cv_opts,
  maxdepth=10, nu=0.1, iter=50)
  
    Error in train.default(x, y, weights = w, ...) : 
    final tuning parameters could not be determined
    In addition: Warning messages:
    1: In nominalTrainWorkflow(dat = trainData, info = trainInfo, method = method,  :
      There were missing values in resampled performance measures.
    2: In train.default(x, y, weights = w, ...) :
     missing values found in aggregated results
  </code></pre>
  
  <p>I'm guessing it's that train() wants additional input, but the warning thrown doesn't give me any hints on what's missing. Additionally, I could be missing a dependency, but there's no hint on what should be there....</p>