Category drift in a live model
Question
A live dataset introduces a category absent from model training. What should the preprocessing pipeline do?
Short answer
Use an explicit documented unknown-category policy rather than silently changing the fitted feature schema. Options include an unknown bucket or a justified default encoding. Fit mappings within training and keep feature order stable. Test serialization, missing values and previously unseen labels. Monitor the frequency of unknown categories because rapid growth may signal distribution change or a broken upstream mapping.
Original question and answer written by SelfMadeQuant.com.
See the hint and the full worked solution in the question bank (free account).
Open the worked solution