Features are the inputs provided to a machine learning model, while labels are the outputs the model is trying to predict.
The input information used by the model. Think of them as clues.
The correct answers the model learns to predict. Think of them as the answer.
Features are pieces of information that help a model make decisions.
Features
Label — Sale price
Labels are the correct answers provided during training.
Features — Email content, sender, subject
Label — Spam or Not Spam
| Features | Labels |
|---|---|
| Inputs | Outputs |
| Information | Correct Answer |
| Used for prediction | Used for learning |
A feature vector contains all features describing a single observation.
Feature Vector — [10, 95]
Meaning — 10 Study Hours, 95% Attendance
| Type | Examples |
|---|---|
| Numerical | Age, Income, Height |
| Categorical | Color, Country, Product Type |
| Text | Emails, Reviews, Documents |
| Image | Photos, Medical Scans |
| Audio | Speech, Music, Voice Commands |
Features — Image
Labels
Features — House characteristics
Label — $450,000 (a number)
Spam Detection — 0 = Not Spam, 1 = Spam
Medical Diagnosis — 0 = Healthy, 1 = Disease
Feature engineering creates new features that may help models learn more effectively.
Raw Feature — Birth Year
Engineered Feature — Current Age (more useful)
Age — 25
Income — 100,000
Income dominates without scaling. Common methods: Normalization, Standardization.
Cat Image → Dog (wrong label)
The model learns incorrect patterns. High-quality labels are essential for supervised learning.
Poor Features — Predicting exam scores using favorite color
Data Leakage — Using future information during training
Incorrect Labels — Labels that do not match the actual data
| Features | Labels |
|---|---|
| Inputs | Outputs |
| Independent Variables | Target Variables |
| Used for Prediction | Used for Learning |
Identify the features and labels for each of the following problems:
Ask the AI if you need help understanding features, labels, feature engineering, feature selection, or supervised learning datasets.