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
for switch in self.ordinal_encoder.mapping:
col = switch.get("col")
column_mapping = switch.get("mapping").copy(deep=True)
if self.handle_unknown == "impute":
column_mapping = column_mapping.append(pd.Series(data=[-1], index=["-1"]))
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 6
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: asyml/texar
Commit Name: de6d802b480f1504d060915dc520bef9223aac84
Time: 2018-03-21
Author: zhitinghu@gmail.com
File Name: texar/data/data/multi_aligned_data.py
Class Name: MultiAlignedTextData
Method Name: _make_processor
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 6a3988c73af1b0fc8c9a880eb26f8606ebd32ad2
Time: 2015-07-01
Author: carlos.torres@rackspace.com
File Name: perfkitbenchmarker/rackspace/rackspace_virtual_machine.py
Class Name: RackspaceVirtualMachine
Method Name: _Exists
Project Name: tyarkoni/pliers
Commit Name: 9007173bc361484fb7484d3abff437d91717c602
Time: 2018-06-14
Author: quinten.mcnamara@gmail.com
File Name: pliers/extractors/api/google.py
Class Name: GoogleLanguageAPIExtractor
Method Name: _to_df