Skip to content

AI Glossary · Concepts

What is Training Data?

Training Data

Training data is the collection of examples used to fit a model's parameters. Depending on the training objective, examples can supply explicit labels or targets derived from the data itself.

· Updated · Chain of Thought

Model Training

  • 1 explainer
  • 2 sources

A support classifier might learn from tickets paired with categories such as billing, access and outages. If most examples come from one product, it may have little evidence about another product’s vocabulary. More rows do not automatically fix missing coverage or incorrect labels.

Document where the examples came from, how they were selected and labeled, and which uses their collection permits. Keep a record of the version used for each training run so changes in behavior can be investigated. Synthetic examples also need review: they can reproduce the generator’s errors or omit difficult cases.

Keep validation and test examples separate from parameter fitting. For instance, hold out tickets from whole customers when the evaluation asks whether the classifier works for new customers. Near-duplicates across splits can make results look better than they are. This distinction matters because training measures what the model fitted, while evaluation asks whether that learning transfers to work it has not seen.

Fit preprocessing on the training split only

Holding out rows is only part of the separation. scikit-learn’s guide to common pitfalls says that train and test data should get the same preprocessing, but “it is important that these transformations are only learnt from the training data”: if a normalization step divides by an average, that average should come from the training subset, not from all the data (scikit-learn, Common pitfalls).

Suppose ticket length in words is one feature, and you center it by subtracting the mean. Two training tickets have lengths 10 and 20, and one validation ticket has length 100:

SplitLength in wordsLength minus 15
Training10−5
Training205
Validation10085

The training mean is (10 + 20)/2 = 15, and the validation ticket is transformed with that same value. Averaging all three lengths instead gives 130/3 ≈ 43.3, which lets the held-out ticket shape the features before any model sees a label. In cross-validation, fit the preprocessing inside each fold’s training part; a pipeline object helps enforce that. Store the fitted preprocessing alongside the dataset version you record for each run, so a change in behavior can be traced to the data or to how it was transformed.

Sources

Go deeper