mstz commited on
Commit
d33e622
1 Parent(s): 05f99a6

Upload compas.py

Browse files
Files changed (1) hide show
  1. compas.py +3 -2
compas.py CHANGED
@@ -116,7 +116,7 @@ features_types_per_config = {
116
  "two-years-recidividity": {
117
  "sex": datasets.Value("int64"),
118
  "age": datasets.Value("int64"),
119
- "race": datasets.Value("int64"),
120
  "number_of_juvenile_fellonies": datasets.Value("int64"),
121
  "decile_score": datasets.Value("int64"),
122
  "number_of_juvenile_misdemeanors": datasets.Value("int64"),
@@ -149,7 +149,7 @@ features_types_per_config = {
149
  "priors-prediction": {
150
  "sex": datasets.Value("int64"),
151
  "age": datasets.Value("int64"),
152
- "race": datasets.Value("int64"),
153
  "number_of_juvenile_fellonies": datasets.Value("int64"),
154
  "decile_score": datasets.Value("int64"),
155
  "number_of_juvenile_misdemeanors": datasets.Value("int64"),
@@ -248,6 +248,7 @@ class Compas(datasets.GeneratorBasedBuilder):
248
  else:
249
  data = pandas.read_csv(filepath)
250
  data = self.preprocess(data, config=self.config.name)
 
251
  for row_id, row in data.iterrows():
252
  data_row = dict(row)
253
 
 
116
  "two-years-recidividity": {
117
  "sex": datasets.Value("int64"),
118
  "age": datasets.Value("int64"),
119
+ "race": datasets.Value("string"),
120
  "number_of_juvenile_fellonies": datasets.Value("int64"),
121
  "decile_score": datasets.Value("int64"),
122
  "number_of_juvenile_misdemeanors": datasets.Value("int64"),
 
149
  "priors-prediction": {
150
  "sex": datasets.Value("int64"),
151
  "age": datasets.Value("int64"),
152
+ "race": datasets.Value("string"),
153
  "number_of_juvenile_fellonies": datasets.Value("int64"),
154
  "decile_score": datasets.Value("int64"),
155
  "number_of_juvenile_misdemeanors": datasets.Value("int64"),
 
248
  else:
249
  data = pandas.read_csv(filepath)
250
  data = self.preprocess(data, config=self.config.name)
251
+
252
  for row_id, row in data.iterrows():
253
  data_row = dict(row)
254