title: How to use custom cross validation folds with XGBoost
body: <p>I'm using the R wrapper for XGBoost. In the function <em>xgb.cv</em>, there is a <code>folds</code> parameter with the description</p>
  
  <blockquote>
    <p>list provides a possibility of using a list of pre-defined CV folds
    (each element must be a vector of fold's indices). If folds are
    supplied, the nfold and stratified parameters would be ignored.</p>
  </blockquote>
  
  <p>So, do I just specify the indices for training the model and assume the rest will be for testing?  For example, if my training data is something like</p>
  
  <pre><code>    Feature1 Feature2 Target
   1:        2       10     10
   2:        7        1      9
   3:        8        2      3
   4:        8       10      7
   5:        8        2      9
   6:        3        7      3
  </code></pre>
  
  <p>and I want to cross validate using (train, test) indices as ((1,2,3), (4,5,6)) and ((4,5,6), (1,2,3)) do I set <code>folds=list(c(1,2,3), c(4,5,6))</code>?</p>