f4838c7408b81ad960c047df5984901927a86d86,category_encoders/one_hot.py,OneHotEncoder,generate_mapping,#OneHotEncoder#,154

Before Change


        mapping = []
        found_column_counts = {}
        for col in self.cols:
            col_tuples = copy.deepcopy(
                [class_map["mapping"] for class_map in self.ordinal_encoder.mapping if class_map["col"] == col][0])
            if self.handle_unknown == "impute":
                col_tuples.append(("-1", -1))

            col_mappings = []

After Change


            column_mapping = switch.get("mapping").copy(deep=True)

            if self.handle_unknown == "impute":
                column_mapping = column_mapping.append(pd.Series(data=[-1], index=["-1"]))

            col_mappings = []
            for cat_name, class_ in column_mapping.iteritems():
                if self.use_cat_names:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: f4838c7408b81ad960c047df5984901927a86d86
Time: 2018-10-26
Author: jcastaldo08@gmail.com
File Name: category_encoders/one_hot.py
Class Name: OneHotEncoder
Method Name: generate_mapping


Project Name: mozilla/TTS
Commit Name: 39c71ee8a98bcbfea242e6b203556150ee64205b
Time: 2020-10-29
Author: erogol@hotmail.com
File Name: tests/test_wavegrad_train.py
Class Name: WavegradTrainTest
Method Name: test_train_step


Project Name: nilmtk/nilmtk
Commit Name: 1f32f952d84f0d44fcfe03367d3834d2464b63a0
Time: 2018-04-22
Author: 10246101+PMeira@users.noreply.github.com
File Name: nilmtk/disaggregate/combinatorial_optimisation.py
Class Name: CombinatorialOptimisation
Method Name: export_model


Project Name: CamDavidsonPilon/lifelines
Commit Name: b1d839cb8e521c3cf2efaebe17082f1a9680a253
Time: 2020-05-13
Author: cam.davidson.pilon@gmail.com
File Name: experiments/working_npmle.py
Class Name:
Method Name: create_turnball_intervals