2ab8c1444facbd46df8767a5badda5b9f1a50c29,tpot/operators/preprocessors/base.py,Preprocessor,_call,#Preprocessor#Any#,33

Before Change


        // Translate non-string column titles into strings
        new_col_names = {}
        for column in modified_df.columns.values:
            if type(column) != str:
                new_col_names[column] = str(column).zfill(10)
        modified_df.rename(columns=new_col_names, inplace=True)

        return modified_df

After Change


        operator_args = self.preprocess_args(*args, **kwargs)

        // Run the feature-preprocessor with args
        features = np.copy(input_matrix)
        np.delete(features, non_feature_columns, axis=1)
        modified_df = self._fit_transform(features, operator_args)

        // Add non_feature_columns back to the matrix
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: EpistasisLab/tpot
Commit Name: 2ab8c1444facbd46df8767a5badda5b9f1a50c29
Time: 2016-08-01
Author: supacoofoo@gmail.com
File Name: tpot/operators/preprocessors/base.py
Class Name: Preprocessor
Method Name: _call


Project Name: havakv/pycox
Commit Name: 1c780253da7bab7eba0dc02e1436a68a9b812a66
Time: 2019-11-09
Author: haavard.kvamme@gmail.com
File Name: pycox/preprocessing/feature_transforms.py
Class Name: OrderedCategoricalLong
Method Name: fit


Project Name: havakv/pycox
Commit Name: 1c780253da7bab7eba0dc02e1436a68a9b812a66
Time: 2019-11-09
Author: haavard.kvamme@gmail.com
File Name: pycox/preprocessing/feature_transforms.py
Class Name: OrderedCategoricalLong
Method Name: transform