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
It looks like an error could be in the remaining encoders. OneHot, Binary and Ordinal use following code:
forcolinself.cols:
ifany(X[col] ==0):
raiseValueError("inverse_transform is not supported because transform impute ""the unknown category -1 when encode %s"%(col,))
While BaseN uses:
forcolinself.cols:
ifany(X[col] ==-1):
raiseValueError("inverse_transform is not supported because transform impute ""the unknown category -1 when encode %s"%(col,))
Note the difference between X[col] == 0 and X[col] == -1.
My hypothesis is that there should be -1 everywhere. 0 is merely a historical artifact from the time when 0 used to be used to mark unknown categories. Am I right?
inverse_transform() in BaseNEncoder does not raise an exception when the test set contains a new value:
The text was updated successfully, but these errors were encountered: