Check your split
Loading the checker…
Paste your train and test CSV files to find copied rows, customers or groups that sit in both, test rows dated before training ends, and features that give away the label. You also see which features drifted, and you can download the test rows to remove.
Runs in your browser. Nothing is uploaded.
Loading the checker…
Not sure what a problem looks like? Choose Try the example. It loads a small churn dataset with a few planted problems.
The example is a churn dataset with 12 training rows from January 2026 and 6 test rows. The label is churned, the ID is customer_id, the group is household_id and the date is event_date. The check finds:
cancel_requested equals churned in every training row (Pearson r = 1). A model would learn the answer, not the pattern.monthly_spend has PSI 8.48 and KS 0.58, and plan has a new value, enterprise, in 33% of test rows.The result is Needs fixing. The fix list says to drop the 2 copied rows, split by household, start the test period after 31 January and remove cancel_requested. With only 18 rows, PSI is very noisy. On real data, a PSI above 0.25 usually means a large shift.
Leakage and drift are different problems, so we report them separately. Leakage makes a test score look better than the model really is. Drift means the test data no longer looks like the training data.
The result is Needs fixing when any leakage check finds something, Looks good when none does, and Can't tell: check by hand when nothing was found but the near-copy scan was skipped. Drift alone never makes a split fail.
Data leakage is when information from the test set, or from the future, gets into training. The model then scores well in testing and worse in real use. Copied rows, the same customer in both splits and features recorded after the outcome are the usual causes.
A random split is fine when rows are independent. If one customer, patient or household has several rows, split by that group, for example with scikit-learn GroupKFold or GroupShuffleSplit. If the model will predict the future, split by time: train on older rows and test on newer ones.
Check for copies first: even a few duplicated rows can lift accuracy. Then look for a feature that is only known after the outcome, like a cancellation flag in a churn model. The proxy check flags features that match the label almost perfectly.
A common rule of thumb: below 0.10 is a small shift, 0.10 to 0.25 is worth a look, and above 0.25 is a large shift. PSI is noisy on small samples, so compare it with KS and with model accuracy on recent data.
Not by itself. Some drift is expected with a time-based split. It tells you the model will see data that differs from training, so check accuracy on the drifted features before you rely on the score.
It compares every test row with every training row, so it runs up to 25,000 pairs, for example 250 training rows and 100 test rows. Exact copies and copies under a new ID are always checked. For a bigger split, run the check on a random sample.
Each file can have up to 1,000 rows and 60 columns, so use a random sample of a bigger split. Near copies are found by matching words, so reworded text can slip through. A proxy or drift flag tells you where to look; you decide whether a feature is fine to use.
Step by step: how to check a train/test split for data leakage. Need to remove duplicate rows before you split? Use the CSV Cleaner & CSV to Excel.