Skip to content

How to handle unknown categorical value in test? #846

Answered by tomicapretto
peeeffchang asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @peeeffchang this example may be helpful https://bambinos.github.io/bambi/notebooks/predict_new_groups.html

In other words, if you have a factor for which you'll have new levels, you should use a hierarchical model. If you don't, you're assuming all the levels observed in the "train" stage are all the levels that exist and then you can't predict on a new group.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by peeeffchang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants