mstz commited on
Commit
33e26ce
1 Parent(s): 10891b3

Upload heloc.py

Browse files
Files changed (1) hide show
  1. heloc.py +2 -2
heloc.py CHANGED
@@ -146,10 +146,10 @@ class Heloc(datasets.GeneratorBasedBuilder):
146
  yield row_id, data_row
147
 
148
  def preprocess(self, data: pandas.DataFrame, config: str = "cancer") -> pandas.DataFrame:
149
- print(list(features_types_per_config["risk"].keys()))
150
- print(data.columns)
151
  data = data[list(features_types_per_config["risk"].keys())]
152
 
 
 
153
  if config == "risk":
154
  return data
155
  else:
 
146
  yield row_id, data_row
147
 
148
  def preprocess(self, data: pandas.DataFrame, config: str = "cancer") -> pandas.DataFrame:
 
 
149
  data = data[list(features_types_per_config["risk"].keys())]
150
 
151
+ data.loc[:, "is_at_risk"] = data.is_at_risk.apply(lambda x: 1 if x == "Bad" else 0)
152
+
153
  if config == "risk":
154
  return data
155
  else: