4-4. Frame - Encoding
This feature is used for columns with categorical data entered.
Label Encoding: Assign a number to each type of variable.
For example, assign 0 for spring, 1 for summer, 2 for fall, and 3 for winter.
One-Hot-Encoding: Assign a binary vector to each type of variable.
For example, spring would be assigned [1, 0, 0, 0], summer would be [0, 1, 0, 0], fall would be [0, 0, 1, 0], and winter would be [0, 0, 0, 1].
Last updated