Interview practice question
Handling categories unseen during training
Machine Learning · ML Frameworks · Beginner
Your model crashes in production because a categorical feature has a value never seen in training. How do you fix this?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- OneHotEncoder(handle_unknown="ignore" or "infrequent_if_exist").
- Group rare categories.
- Models with native categorical support handle unknowns.
- Validate inputs; monitor new categories.
- Retrain periodically.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.