Dataview:
list from [[]] and !outgoing([[]])π -> One-Hot Encoding
β Information
A Data-Processing method.
One-hot encoding is a common preprocessing technique used when working with categorical data in machine learning.
It serves to:
- Convert categorical values into processable numeric vectors
- Captures uniqueness of categories
π -> Methodology
When processing the three primary colors:
- βredβ becomes [1, 0, 0], βgreenβ is [0, 1, 0], and βblueβ is [0, 0, 1].>
It will create a new column for each distinct category.
βοΈ -> Usage
-
Might not be great if there are a large number of distinct categories.
- It creates a new column for each distinct one. Number of features can grow quite large.
-
It categorical has a logical ordering (disagree, neutral, agree) Ordinal-Encoding is an alternative that maps to integers rather than binaries.
-
from sklearn.preprocessing import OneHotEncoder
π§ͺ-> Example
- Define examples where it can be used
π -> Related Word
- Link all related words