
Shobha
The best way to predict the future is to invent it
How do you handle categorical data in machine learning models?
Categorical data is usually handled using encoding methods like one-hot encoding or label encoding, converting categories into numerical values that models can process. For example,"Red" → [1, 0], "Blue" → [0, 1] using one-hot encoding.