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
If there are unseen categories in the forward transform: Add a warning and randomly assign labels
Clip during reverse transform
>>>fromtransformers.categoricalimportLabelEncoder>>>le=LabelEncoder()
>>>le.fit(data, column='categorical_column')
# if the transform contains new categories unseen during fit>>>le.transform(data_new_categories)
Warning: Thedatacontainsnewcategories ('hello', 'world') thatwerenotintheoriginaldata.
Assigningthemrandomvalues. Ifyouwanttomodelnewcategories, pleasefitthetransformeragainwiththenewdata.
# if there is out-of-bounds data in the reverse, clip it silently>>>le.reverse_transform(out_of_bounds_data)
The text was updated successfully, but these errors were encountered:
Problem Description
Let's update
LabelEncodingTransformer
to make it more user friendly.Expected behavior
Name:
LabelEncoder
Functionality:
columns
(see Renamecolumns
parameter infit
for each individual transformer #376 )The text was updated successfully, but these errors were encountered: