MMOOZZGG.com

Glossary

What is a training dataset?

In short

A training dataset is the part of your data that a model uses to set its weights: examples with known answers that it learns from.

Machine learning · training set

MMOOZZGG.com editorsChecked: 2 min read

For a child

Before a test, the teacher hands out practice problems, and the answers are printed at the back of the workbook. You solve them, check and see where you went wrong. The test itself will have other problems you have never seen. A computer also practices first on problems with answers, and this stack is called its training dataset.

In plain words

To learn, a model is shown many examples with the right answers: emails marked “spam” or “not spam”, deals with the outcome “bought” or “declined”. This part of the data is called the training set. The other examples are kept aside to test the model later on what it has not seen. The practice examples must look like the future work: if you train only on winter sales, the summer forecast will fail. The model also learns any errors in the labels, so the data is cleaned first. It is like an intern who learns from the department’s past cases.

For business

This part of an AI project often takes the most work: export the history from the CRM and the accounting system, remove duplicates, label examples and agree on the right to use the data. It sets the ceiling of quality: the model learns nothing about situations that were not in the data. Check three things. Does the set cover all the seasons, regions and customer types the model will work with? Do the features hold information that appears only after the event, such as payment status in a late-payment forecast? Do the same customers end up in both training and testing? Personal data in such a set is processed under 152-FZ, Russia’s personal data law. The pilot decides what data you need to start.

For a specialist

A training set is the subset of labeled data on which model parameters are optimized by minimizing a loss function. It is separated from the validation set and the test set. The train_test_split function in scikit-learn, when no sizes are given, puts 25% of rows into the test set, shuffles them by default and can keep class shares (stratify). Training examples must come from the same distribution as future data, or distribution shift appears. The scikit-learn documentation also requires that preprocessing (standardization, feature selection) is fitted only on this part and then applied to held-out data, most easily through a Pipeline. Breaking this rule causes data leakage: Kapoor and Narayanan (2022) counted 17 scientific fields where such errors were found and 329 affected papers. Time series are split by time, and grouped data (customers, patients) by group.

Example

An insurer built a training dataset for a damage assessment model from three years of claims. At first it held only city branches, and the model underestimated damage in rural areas. After claims from all regions were added, the misses across districts evened out.

Related terms

Questions and answers

How much data does a training dataset need? It depends on the task and the model: a simple classifier sometimes needs only a few hundred examples, while a neural network trained from scratch needs far more. A reliable way to find out is to build a learning curve.

If quality grows as you add data, keep collecting it.

How is a training dataset different from a test set? On the training set, the model fits its weights. It does not see the test set until the final check, and only the test set gives a fair measure of how it works on new data.

Sources

Not sure whether your company needs this?

AI solutions map
Contact us