mstz commited on
Commit
a5cc67d
1 Parent(s): ab016e7

Upload bank.py

Browse files
Files changed (1) hide show
  1. bank.py +4 -4
bank.py CHANGED
@@ -149,11 +149,11 @@ class Bank(datasets.GeneratorBasedBuilder):
149
  raise ValueError(f"Unknown config: {config}")
150
 
151
  def encoding_dictionaries(self):
152
- education_dic, binary_dic = self.education_encoding_dic(), self.binary_encoding_dic()
153
  education_data = [("education", education, code) for education, code in education_dic.items()]
154
- loan_data = [("loan", loan, code) for loan, code in binary_dic.items()]
155
- housing_data = [("housing", housing, code) for housing, code in binary_dic.items()]
156
- default_data = [("default", default, code) for default, code in binary_dic.items()]
157
  data = pandas.DataFrame(education_data, loan_data + housing_data + default_data,
158
  columns=["feature", "original_value", "encoded_value"])
159
 
 
149
  raise ValueError(f"Unknown config: {config}")
150
 
151
  def encoding_dictionaries(self):
152
+ education_dic, yes_no_dic = self.education_encoding_dic(), self.yes_no_encoding_dic()
153
  education_data = [("education", education, code) for education, code in education_dic.items()]
154
+ loan_data = [("loan", loan, code) for loan, code in yes_no_dic.items()]
155
+ housing_data = [("housing", housing, code) for housing, code in yes_no_dic.items()]
156
+ default_data = [("default", default, code) for default, code in yes_no_dic.items()]
157
  data = pandas.DataFrame(education_data, loan_data + housing_data + default_data,
158
  columns=["feature", "original_value", "encoded_value"])
159