feature_engine
feature_engine copied to clipboard
`OrdinalEncoder` could output -1 for unseen categories
The OrdinalEncoder has an errors argument which can either raise an error or output NaNs when encountering new categories. For this particular class, it'd make sense to output -1 when a new category is encoded instead of generating NaNs.
We did this for the CountEncoder already. I think the best would be to have a look at how we implemented there?