a4c916b628fdfec66253cfd725f4c983a0d54405,category_encoders/basen.py,BaseNEncoder,inverse_transform,#BaseNEncoder#Any#,243

Before Change


            return X if self.return_df else X.values

        if self.handle_unknown == "value":
            for col in self.cols:
                if any(X[col] == -1):
                    raise ValueError("inverse_transform is not supported because transform impute "
                                     "the unknown category -1 when encode %s" % (col,))

        if self.handle_unknown == "return_nan":
            for col in self.cols:
                if X[col].isnull().any():
                    raise ValueError("inverse_transform is not supported because transform impute "

After Change



            if self.handle_unknown == "return_nan" and self.handle_missing == "return_nan":
                for col in self.cols:
                    if X[switch.get("col")].isnull().any():
                        warnings.warn("inverse_transform is not supported because transform impute "
                                      "the unknown category nan when encode %s" % (col,))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: a4c916b628fdfec66253cfd725f4c983a0d54405
Time: 2019-01-03
Author: jcastaldo08@gmail.com
File Name: category_encoders/basen.py
Class Name: BaseNEncoder
Method Name: inverse_transform


Project Name: reinforceio/tensorforce
Commit Name: 846a51636bca9f870c518add3ff604a7eb9b1bc9
Time: 2020-04-25
Author: luca.anzalone.dev@gmail.com
File Name: tensorforce/environments/carla_environment.py
Class Name: CARLAEnvironment
Method Name: _get_observation


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: a4c916b628fdfec66253cfd725f4c983a0d54405
Time: 2019-01-03
Author: jcastaldo08@gmail.com
File Name: category_encoders/one_hot.py
Class Name: OneHotEncoder
Method Name: inverse_transform