Cross-validating temporal data while accidentally destroying its chronological order.
Codepython
from sklearn.model_selection import KFold, cross_val_score
# X, y are ordered by time (oldest first)
cv = KFold(n_splits=5, shuffle=True, random_state=0)
scores = cross_val_score(model, X, y, cv=cv)
What is wrong with validating this time-series data?