Uploaded October 2026 | Updated December 2026, 2 hours ago
How to Turn Categories Into Numbers: One-Hot Encoding — AI for Beginners, Lesson 10.
Free, no-code lesson for students (grades 6–12), teachers, parents and anyone curious about AI. School-level maths only.
Area and age are numbers. But how can a house-price model use a place name?
Explore three fictional localities — Park, Lake and Hill — and turn their names into yes/no inputs. Watch how the switches select a location adjustment without inventing a ranking between the places.
In this lesson:
- Why multiplying arbitrary location codes by one weight imposes equal steps in our linear rule.
- How zero/one indicators represent category names.
- Why a reference locality lets us use two indicators for these three locations.
- How a location weight adds to or subtracts from a prediction.
- Why the supplied adjustments illustrate the calculation rather than establish real property values.
Try both quiz questions before the answers appear: choose the indicator pair for Hill, then calculate a Lake prediction from a supplied starting estimate.
Chapter 2, session 6 / Lesson 10. No coding required. Watch Lessons 8 and 9 first for multiple inputs and choosing weights together.
The localities and model settings are fictional teaching examples. Location adjustments are supplied for demonstration; fitting a real model would require reconsidering its settings together and checking its predictions.
▶ Previous: How AI Fits Many Weights Together (and Why They Change) youtu.be/GO7KtvabKk4
▶ Full course playlist: youtube.com/playlist?list=PLZRvbQ5k8TxM
▶ Next: Build Your First AI Model (No Code): Predict House Prices youtu.be/T2SDKslWDUQ
Subscribe to The Practical School for short lessons that make ideas practical.
#AIForBeginners #MachineLearning #ThePracticalSchool
How to Turn Categories Into Numbers: One-Hot Encoding — AI for Beginners, Lesson 10.
Free, no-code lesson for students (grades 6–12), teachers, parents and anyone curious about AI. School-level maths only.
Area and age are numbers. But how can a house-price model use a place name?
Explore three fictional localities — Park, Lake and Hill — and turn their names into yes/no inputs. Watch how the switches select a location adjustment without inventing a ranking between the places.
In this lesson:
- Why multiplying arbitrary location codes by one weight imposes equal steps in our linear rule.
- How zero/one indicators represent category names.
- Why a reference locality lets us use two indicators for these three locations.
- How a location weight adds to or subtracts from a prediction.
- Why the supplied adjustments illustrate the calculation rather than establish real property values.
Try both quiz questions before the answers appear: choose the indicator pair for Hill, then calculate a Lake prediction from a supplied starting estimate.
Chapter 2, session 6 / Lesson 10. No coding required. Watch Lessons 8 and 9 first for multiple inputs and choosing weights together.
The localities and model settings are fictional teaching examples. Location adjustments are supplied for demonstration; fitting a real model would require reconsidering its settings together and checking its predictions.
▶ Previous: How AI Fits Many Weights Together (and Why They Change) youtu.be/GO7KtvabKk4
▶ Full course playlist: youtube.com/playlist?list=PLZRvbQ5k8TxM
▶ Next: Build Your First AI Model (No Code): Predict House Prices youtu.be/T2SDKslWDUQ
Subscribe to The Practical School for short lessons that make ideas practical.
#AIForBeginners #MachineLearning #ThePracticalSchool










