be4714db73202347a07044f2e26920e0da95fff3,category_encoders/basen.py,BaseNEncoder,basen_to_integer,#BaseNEncoder#Any#Any#Any#,335

Before Change


                len0 = len(col_list)
                value_array = np.array([base ** (len0 - 1 - i) for i in range(len0)])

            X[col] = np.dot(X[col_list].values, value_array.T)
            out_cols = [col0 for col0 in out_cols if col0 not in col_list]

        X = X.reindex(columns=out_cols + cols)

        return X

    def col_transform(self, col, digits):

After Change


        -------
        numerical: DataFrame
        
        out_cols = X.columns.values.tolist()

        for col in cols:
            col_list = [col0 for col0 in out_cols if str(col0).startswith(str(col))]
            insert_at = out_cols.index(col_list[0])

            if base == 1:
                value_array = np.array([int(col0.split("_")[-1]) for col0 in col_list])
            else:
                len0 = len(col_list)
                value_array = np.array([base ** (len0 - 1 - i) for i in range(len0)])
            X.insert(insert_at,col,np.dot(X[col_list].values, value_array.T))
            X.drop(col_list, axis=1, inplace=True)
            out_cols = X.columns.values.tolist()

        return X

    def col_transform(self, col, digits):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 15

Instances


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: be4714db73202347a07044f2e26920e0da95fff3
Time: 2019-03-23
Author: datarian@againstthecurrent.ch
File Name: category_encoders/basen.py
Class Name: BaseNEncoder
Method Name: basen_to_integer


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: edac1ed27ba8a4db58f526af053d6cd2b4f50497
Time: 2019-03-22
Author: datarian@againstthecurrent.ch
File Name: category_encoders/basen.py
Class Name: BaseNEncoder
Method Name: basen_to_integer


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 31f768dd2cd555649d2b0e494935cb37cf223142
Time: 2019-03-22
Author: datarian@againstthecurrent.ch
File Name: category_encoders/one_hot.py
Class Name: OneHotEncoder
Method Name: reverse_dummies