Loading...
const shuffled = shuffle(rows);
const train = shuffled;
const test = shuffled.slice(0, 200);const shuffled = shuffle(rows);
const test = shuffled.slice(0, 200);
const train = shuffled.slice(200);The test rows are no longer part of the training set, so the score measures how the model does on unseen data.
The training set fits the model, the validation set tunes settings and picks versions, and the test set gives a final score on unseen data.
It depends on the task and model. Quality and coverage of real cases usually matter more than raw size, especially for fine-tuning.
Data leakage happens when information from the test set reaches training, making scores look better than the model really performs.