title: Time-series - data splitting and model evaluation
body: <p>I've tried to use machine learning to make prediction based on time-series data. In one of the stackoverflow question (<a href="https://stackoverflow.com/questions/22334561/createtimeslices-function-in-caret-package-in-r">createTimeSlices function in CARET package in R</a>) is an example of using createTimeSlices to cross-validation for model training and parameter tuning:</p>
  
  <pre><code>    library(caret)
      library(ggplot2)
      library(pls)
      data(economics)
      myTimeControl &lt;- trainControl(method = "timeslice",
                                    initialWindow = 36,
                                    horizon = 12,
                                    fixedWindow = TRUE)
  
      plsFitTime &lt;- train(unemploy ~ pce + pop + psavert,
                          data = economics,
                          method = "pls",
                          preProc = c("center", "scale"),
                          trControl = myTimeControl)
  </code></pre>
  
  <p>My understanding is:</p>
  
  <ol>
  <li>I need to split may data to training and test set.</li>
  <li>Use training set for parameters tuning.</li>
  <li>Evaluate obtained model on the test set (using R2, RMSE, etc.)</li>
  </ol>
  
  <p>Because my data is time-series, I suppose that I cannot use bootstraping for spliting data into training and test set. So, my questions are: Am I right? And If so - How to use createTimeSlices for model evaluation?</p>