Features & LabelsUnderstanding AI Inputs & Outputs
Learn how machine learning models make predictions by connecting measurable input properties (Features) to target answer outcomes (Labels).
Features & Labels
What goes in and what comes out?
To train a Machine Learning model, we break data into two core components: Features (the measurable inputs) and Labels (the target output answers).
Fruit Ripeness Analogy: Imagine predicting if a banana is ready to eat. The FEATURES are its Color (Green/Yellow), Size (Small/Large), and Firmness (Hard/Soft). The target LABEL is 'Not Ripe' or 'Ripe'!
Quick Activity: Identify Features vs Label
Classify each banana property below as a Feature or a Label:
Features Explained
Measurable Input Properties
Features are the quantifiable characteristics the AI scans to make predictions. Look at this house price dataset table:
| Feature: Size (mยฒ) | Feature: Bedrooms | Feature: Location | Target Label: House Price |
|---|---|---|---|
| 120 mยฒ | 3 Bedrooms | City Center | ยฃ350,000 |
| 85 mยฒ | 2 Bedrooms | Suburbs | ยฃ210,000 |
๐ก Interactive Activity: Choose the Useful Features for Predicting House Prices
Click each feature to toggle whether it helps predict house prices:
Labels Explained
Target Output Answers
Labels are the target answers we want the AI to predict. Labels come in 3 main types:
Binary Label
Exactly 2 choices (e.g. Spam or Not Spam, Yes or No).
Multi-class Label
3 or more categories (e.g. Cat vs Dog vs Bird).
Continuous Label
A numerical value (e.g. House price = ยฃ250,000).
๐ฏ Interactive Activity: Match the Task to its Label Type
Select the correct label classification for each task below:
"Is this email spam?"
"Which animal is in this photo?"
"What will this house cost?"
Playground: Feature Picker
Predicting Exam Success
Toggle features on or off to see how selecting relevant vs irrelevant input variables affects the AI model's predictions!
Select Features to Include in the Model
Feature Impact Summary:
โ Study Hours: Study time directly improves knowledge!
โ Attendance %: Attending class helps understand topics!
Interactive Exercises
Exercise 1: Feature or Label? (Spam Filter)
+15 XP ยท BeginnerExercise 2: Feature or Label? (Dog Breeds)
+20 XP ยท BeginnerExercise 3: Label Type Classification
+25 XP ยท IntermediateExercise 4: Feature Selection
+30 XP ยท IntermediateKnowledge Check
Test your understanding
Ready to test your knowledge?
Answer 10 multiple-choice questions to test your understanding of features, labels, and classification!
Build Real Machine Learning Models with Tutors
Take the next step! Join our live Intro to Machine Learning Course and write real Python ML code with expert 1-on-1 guidance.