Skip to main content

What is training data?

The AI Glossary

In our classes, we often pause to explain the ideas behind AI and the language used to describe it. These posts grew out of those conversations. They’re for anyone who would like to understand AI better, with no technical background assumed.

Training data is the collection of examples used to develop a machine-learning model. A model learns by adjusting its internal numerical settings according to a training objective: a rule describing what successful performance looks like. The examples and the objective together influence what the model becomes good at.

In supervised learning, examples include target answers. An email may be paired with “spam,” or a scan with an expert’s assessment. In self-supervised learning, the target can come from the data itself: software might hide a word and ask the model to predict it. These are different ways of creating a learning task, not different guarantees of quality.

Training data is not the same as everything an AI application can access. A document supplied during a conversation may guide the current answer without changing the model’s learned settings. Nor is a model a dependable filing cabinet for its training examples. Its settings capture patterns, although some models can also memorize and reproduce particular material.

Useful questions about a training collection include where it came from, who is represented, what was excluded, how errors were handled and what permissions govern its use. These questions are often grouped under data provenance: the history and origin of the information. A large collection can still be repetitive, unrepresentative or poorly matched to its purpose.

Examples used to assess performance should be appropriately separate from examples used for development. The separation may need to occur by patient, institution or time, rather than by randomly dividing rows. Otherwise, an apparently new test may contain familiar information.

Suppose a clinic wants to predict which referrals will remain incomplete. Its records describe the patients who reached that clinic and the administrative process operating at the time. They may omit people who never secured a referral or gave up before registration. Training on those records can still be useful, but it answers a narrower question than “Who in the community needs care?” Understanding that boundary is part of understanding the model.

Sources: scikit-learn — Common Pitfalls and Recommended Practices; Devlin and colleagues — BERT (2019)

Further reading from Harvard Chan: Public Health Perspectives — How Health Care Leaders Can Build Effective, Bias free AI (2022).

To learn more, take a look at the AI in Health Care Certificate of Specialization from the Advanced Learning Academy at Harvard T.H. Chan School of Public Health. You can take an individual course or work toward the full certificate.


I’m a doctor, not a statistician. I teach the AI in Health Care Certificate of Specialization with Dr. Heather Mattie, a statistician and co-director of Harvard Chan’s Health Data Science master’s program. For more on data science and statistics, see Harvard Chan’s Health Data Science resources.

AI is a fast-moving field. This explanation reflects our class discussions and related material at the time of writing. Terminology, capabilities and tools may change.

For suggested additions or corrections, please email me at tpanch@hsph.harvard.edu.

Dr. Trishan Panch
Program Director, AI in Health Care
Harvard T.H. Chan School of Public Health — Advanced Learning Academy

Lead with AI in Health Care

The AI Pragmatist is a monthly newsletter from ALA faculty, with new explainers & essays from the Advanced Learning Academy