What is a feature in machine learning?
The Harvard Chan 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.
A feature is an individual piece of information supplied to a model to help it make a prediction. A model is the learned component that links information to an output. Features can be directly measured, such as the size of a parcel, or derived from other records, such as the number of previous deliveries to an address.
Consider predicting delivery time. Possible features include distance, parcel size and the service selected. The target is the answer the model is intended to predict—in this case, delivery time. Features describe what is known; the target describes what the system is trying to estimate.
The name of a column is not enough to establish its meaning. “Distance” might mean straight-line distance, road distance or the distance between distribution centers. “Previous deliveries” might include canceled orders. These choices affect what relationship the model can learn and whether it applies to the intended task.
Timing is equally important. A feature must be available when the prediction is needed. The actual arrival timestamp would not be appropriate when estimating delivery time at checkout. Using such future information creates data leakage: an unrealistically helpful clue that makes testing look better than real use.
A derived feature combines or transforms existing information. For example, order date can be converted into day of the week. This may be useful, but the transformation should be documented and applied consistently. Otherwise, the model may receive differently defined information during development and later use.
Features can also carry unintended information. A postcode may reflect patterns related to income, service availability or geography. A model can use those relationships even when the team did not explicitly ask it to. Whether a feature is appropriate depends on the purpose and consequences, not only on whether it improves a score.
In a readmission-risk or triage model, candidate input features might include age, vital signs and prior emergency visits available at the defined assessment point. Each needs a clear meaning, source and timestamp. “No previous admission” and “previous admissions not documented” should not silently become the same value. A later discharge summary is not a valid early-assessment input merely because it contains useful information. These input features are different from product features such as a dashboard or export button: the same word describes two different things.
If you would like to find out more about AI and improve your leadership skills, consider 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.
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