You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use a OneHotEncoder that includes nan values, the transformer correctly works. If I save/reload the object, then there is a unnecessary warning claiming that there are unseen categories (nan).
/usr/local/lib/python3.8/dist-packages/rdt/transformers/categorical.py:381: UserWarning: The data contains
1 new categories that were not seen in the original data (examples: {nan}).
Creating a vector of all 0s. If you want to model new categories, please fit the transformer again with the
new data. warnings.warn(
The warning does not occur unless you save/reload the object. The warning does not seem to be necessary, as the transformer is correctly identifying and transforming nan values.
Environment Details
Error Description
When I use a
OneHotEncoder
that includesnan
values, the transformer correctly works. If I save/reload the object, then there is a unnecessary warning claiming that there are unseen categories (nan
).The warning does not occur unless you save/reload the object. The warning does not seem to be necessary, as the transformer is correctly identifying and transforming
nan
values.Steps to reproduce
Additional Context
After saving/reloading the object, the check in the following line seems to be producing
{nan}
:It's unclear why. As the
nan
values are the same.Other transformers such as
LabelEncoder
use a different check so maybe it's worth using that.The text was updated successfully, but these errors were encountered: