bc29399207d1e4a3931fa9995006acb394c1de6f,category_encoders/one_hot.py,OneHotEncoder,reverse_dummies,#OneHotEncoder#,282

Before Change


                    val = tran_col.split("_")[1]
                    X.loc[X[tran_col] == 1, col] = val
            else:
                value_array = np.array([int(col0.split("_")[1]) for col0 in col_list])
                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]

After Change



        for col in cols:
            col_list = [col0 for col0 in out_cols if str(col0).startswith(col)]
            prefix_length = len(col)+1 // Original column name plus underscore
            if self.use_cat_names:
                X[col] = 0
                for tran_col in col_list:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: bc29399207d1e4a3931fa9995006acb394c1de6f
Time: 2018-08-09
Author: jan@motl.us
File Name: category_encoders/one_hot.py
Class Name: OneHotEncoder
Method Name: reverse_dummies


Project Name: dgasmith/opt_einsum
Commit Name: cdf7a78f61adc84cff1de0d6bad9d54c263c598c
Time: 2018-07-21
Author: john.gray.14@ucl.ac.uk
File Name: opt_einsum/contract.py
Class Name: ContractExpression
Method Name: __init__


Project Name: ANTsX/ANTsPy
Commit Name: 1809499b8a0d97cb36aada9482b764eb4692476f
Time: 2020-09-16
Author: stnava@gmail.com
File Name: ants/segmentation/joint_label_fusion.py
Class Name:
Method Name: joint_label_fusion