Some of you may be familiar with the unusual split scheme used for time-series data. In short, there is a saying that one should only consider a split where the training set comes prior to the testing set (in terms of index or timedate
), as otherwise we essentially use future data to infer.
Namely, given the dataset $\mathcal{D}=\{(x_1,y_1),...,(x_n,y_n)\}$, a viable split may look like \begin{align} train=\{(x_1,y_1),...,(x_j,y_j)\}\subseteq\mathcal{D}\\ test=\{(x_{j+1},y_{j+1}),...,(x_k,y_k)\}\subseteq\mathcal{D} \end{align} for some $j\leq k\leq n$
My question is - are there some cases where random splitting is O.K in time series? Also, what is the main problem with random sampling?