374ca541aaf62aba88a144acbbc7398ca3e995ef,category_encoders/target_encoder.py,TargetEncoder,transform,#TargetEncoder#Any#Any#,141

Before Change



        if not self.cols:
            return X
        X, _ = self.target_encode(
            X, y,
            mapping=self.mapping,
            cols=self.cols,

After Change


        if not self.cols:
            return X

        X = self.ordinal_encoder.transform(X)

        if self.handle_unknown == "error":
            if X[self.cols].isnull().any():
                raise ValueError("Unexpected categories found in dataframe")

        X = self.target_encode(X)

        if self.drop_invariant:
            for col in self.drop_cols:
                X.drop(col, 1, inplace=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 374ca541aaf62aba88a144acbbc7398ca3e995ef
Time: 2018-11-26
Author: jcastaldo08@gmail.com
File Name: category_encoders/target_encoder.py
Class Name: TargetEncoder
Method Name: transform


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 374ca541aaf62aba88a144acbbc7398ca3e995ef
Time: 2018-11-26
Author: jcastaldo08@gmail.com
File Name: category_encoders/target_encoder.py
Class Name: TargetEncoder
Method Name: fit


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 37f1544cb19794294029aa64e7b119b69ef09f51
Time: 2018-11-20
Author: contact@againstthecurrent.ch
File Name: category_encoders/target_encoder.py
Class Name: TargetEncoder
Method Name: transform