AI Dictionary › Fondamenti AI
The train-test split is the fundamental practice of dividing a dataset into two separate parts before training a machine learning model: one portion, usually the majority, is used for training, and a smaller portion is set aside as the test set, to be used only at the end to measure how well the model performs on data it has never seen during learning.
The train-test split is the fundamental practice of dividing a dataset into two separate parts before training a machine learning model: one portion, usually the majority, is used for training, and a smaller portion is set aside as the test set, to be used only at the end to measure how well the model performs on data it has never seen during learning.
The split is typically done in proportions such as 80-20 or 70-30 between training and test, chosen randomly to avoid systematic bias, unless the data is time-based, in which case chronological order must be respected so the model is not shown future information during training. The test set must remain completely isolated throughout model development: consulting it too many times to adjust choices, a common mistake called data leakage, produces optimistic and misleading performance estimates.
It is the basic safeguard against overfitting: a model that performs great on training data but poorly on the test set has likely memorized the specific details of training instead of learning generalizable patterns. A third set, the validation set, is often added to choose hyperparameters without compromising the fairness of the final test set, or the whole scheme is replaced with cross-validation when available data is limited.
The practice of separating estimation data from verification data belongs to classical statistics, but it became a standard machine learning procedure starting in the 1970s and 80s, as the research community began systematically recognizing the risk of a model appearing accurate only because it was evaluated on the same data it was built from. The name literally describes the operation: splitting the data between train and test.
Il train-test split è la pratica fondamentale di dividere un dataset in due parti separate prima di addestrare un modello di machine learning: una porzione, di solito la maggioranza, viene usata per l'addestramento, e una porzione più piccola viene messa da parte come test, da usare solo alla fine per misurare quanto il modello si comporta bene su dati che non ha mai visto durante l'apprendimento.
La divisione avviene tipicamente in proporzioni come 80-20 o 70-30 tra addestramento e test, scelte in modo casuale per evitare distorsioni sistematiche, a meno che non si tratti di dati temporali, dove è necessario rispettare l'ordine cronologico per non far vedere al modello informazioni future durante l'addestramento. Il test set deve rimanere completamente isolato durante tutto lo sviluppo del modello: consultarlo troppe volte per aggiustare le scelte, un errore comune chiamato data leakage o fuga di informazioni, produce stime di prestazione ottimistiche e ingannevoli.
È il controllo di base contro l'overfitting: un modello che ottiene ottimi risultati sui dati di addestramento ma scarsi sul test set ha probabilmente memorizzato i dettagli specifici dell'addestramento invece di imparare pattern generalizzabili. Spesso si aggiunge anche un terzo insieme, quello di validazione, usato per scegliere gli iperparametri senza intaccare l'imparzialità del test set finale, oppure si sostituisce l'intero schema con la cross-validation quando i dati disponibili sono limitati.
La pratica di separare dati di stima e dati di verifica appartiene alla statistica classica, ma si formalizza come procedura standard nel machine learning a partire dagli anni '70 e '80, quando la comunità di ricerca iniziò a riconoscere sistematicamente il rischio che un modello sembrasse accurato solo perché valutato sugli stessi dati con cui era stato costruito. Il nome descrive letteralmente l'operazione: dividere, split, i dati tra addestramento, train, e verifica, test.
From our network
AGORÀ Intelligence — Enterprise AI Governance Platform
Govern AI at scale: policies, adoption and measurable results on your data. Built for boards and C-suite.
Visit agora-intelligence.com →From the Agora Intelligence blog
📱 Download the Android app (beta) iOS coming soon
Say what you mean. Get what you need.
Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.