Is it necessary for the observations of the data set to be IID in order to use cross-validation on it? If so, why ? Could you explain in the context of a classification using decision tree.

  • 1
    $\begingroup$ features or the samples? $\endgroup$
    – gunes
    Jul 6 '20 at 10:25
  • $\begingroup$ @gunes I mean the samples / rows of a data set $\endgroup$
    – learner
    Jul 7 '20 at 1:37

Yes, the typical cross validation assumes iid samples, so that it can freely split the data into training and validation. In case of dependency, such as the temporal dependency in time series datasets, modifications respecting this dependency should be done for the splitting of data. Otherwise, there will be data leakage. See the following for an example of validation in non iid case: time series cross validation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.