Skip to main content
When rows are ordered in time, a model will predict the future from the past. Validate it the same way. Shuffled folds would let it train on rows after the ones it is scored on.

Set it up

At the Rows question, choose Ordered in time. Claude proposes a cut, such as the last 20% of rows or a period you name, and writes a copy of your CSV with a fold column:
  • rows in the validation period get fold 0
  • every earlier row gets fold -1 and only trains
Claude tells you the copy’s name and how many rows each fold has. With a fold column, Autofit uses your folds instead of its own. See Locked folds. To build the copy yourself:

Leave a gap when labels look ahead

If a row’s target is measured after the row’s date, the last training labels can overlap the validation period. Remove the rows in between. For example, if each row’s target is the next day’s return, drop the day before the validation period starts. Otherwise the last training row’s label is the first validation day’s return.

Keep only rows whose outcome is known

A recent row may not have its outcome yet: a loan still running, a customer who has not had time to churn. Keeping those rows biases the target towards early outcomes. Filter to rows whose outcome is final before you start, for example matured loans only.

Decide whether the date is a feature

Claude asks whether the time column itself should be a feature. A date can carry trend or seasonality. It can also let the model learn something specific to the training period that does not carry forward. If you drop the date, the agent cannot build features from it, such as per-date ranks or a day of the week. Drop it only if those ideas cannot help.

What to expect

  • One validation fold. Scores are noisier than with 8 folds.
  • No repeats. The same fold is used every time.
  • The final model trains on all rows, including the validation period, so it uses the latest data when it predicts.