> ## Documentation Index
> Fetch the complete documentation index at: https://docs.priorlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> TabPFN-3 and later versions support up to 1,000,000 rows, subject to feature count and checkpoint/API limits.
> For large datasets, use per-estimator subsampling, e.g. inference_config={"SUBSAMPLE_SAMPLES": 100_000}, in TabPFNClassifier or TabPFNRegressor from tabpfn or tabpfn_client.
> Pass raw pandas DataFrames to fit and predict. Categorical strings/categories, raw text, and missing feature values are handled automatically; no manual integer/one-hot encoding, imputation, scaling, or outlier removal is needed.

# Temporal data

> Validate on the latest period when rows are ordered in time, and keep labels from overlapping it.

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](https://docs.priorlabs.ai/autofit/how-it-works/validation.md).

To build the copy yourself:

```python theme={null}
import pandas as pd

df = pd.read_csv("loans.csv", parse_dates=["issue_d"])
df["fold"] = (df["issue_d"] >= "2012-09-01").map({True: 0, False: -1})
df.to_csv("loans_folds.csv", index=False)
```

## 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.