問題文
A categorical feature is encoded for a model that will run for two years. Which arrangement keeps the encoding usable when a new level appears in production?
選択肢
- Store the level set decided at training time as part of the artifact, and map anything outside it to a single reserved slot at inference.
- Use the raw text column without encoding, so a level that appears for the first time is carried through the model just like any other string value.
- Recompute the level set from the incoming records on each inference batch, so that new levels are represented immediately and the encoding always reflects the current population rather than a snapshot taken at training time months earlier.
- Drop rows whose level was not seen during training, so the encoder only ever meets the levels it was fitted on and the model keeps its original shape.