Data science and machine learning hub
Python, SQL, stats, ML, deep learning, projects, PDFs, roadmaps and AI resources.
For beginners, data scientists and ML engineers
π https://rebrand.ly/bigdatachannels
DMCA: @disclosure_bds
Contact: @mldatascientist
Post #1329
1.23K

π§© Why One-Hot Encoding Exists
Machine learning models don't understand words.
They understand numbers.
So how do you feed a value like:
You can't simply write:
The model might think Green > Blue > Red, even though colors have no natural order.
Instead, we create separate columns:
This is called One-Hot Encoding. It represents categories without introducing fake relationships.
Machine learning models don't understand words.
They understand numbers.
So how do you feed a value like:
Color = Red
You can't simply write:
Red = 1
Blue = 2
Green = 3
The model might think Green > Blue > Red, even though colors have no natural order.
Instead, we create separate columns:
Red 1 0 0
Blue 0 1 0
Green 0 0 1
This is called One-Hot Encoding. It represents categories without introducing fake relationships.
- β€ 8







