Datasets:
Upload compas.py
Browse files
compas.py
CHANGED
|
@@ -312,7 +312,8 @@ class Compas(datasets.GeneratorBasedBuilder):
|
|
| 312 |
|
| 313 |
def two_years_recidividity_preprocessing(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
| 314 |
# categorize features
|
| 315 |
-
data.
|
|
|
|
| 316 |
|
| 317 |
return data
|
| 318 |
|
|
@@ -324,7 +325,7 @@ class Compas(datasets.GeneratorBasedBuilder):
|
|
| 324 |
|
| 325 |
def priors_prediction_preprocessing(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
| 326 |
# categorize features
|
| 327 |
-
data.loc[:, "race"] = data.race.apply(self.encode_race
|
| 328 |
|
| 329 |
return data
|
| 330 |
|
|
|
|
| 312 |
|
| 313 |
def two_years_recidividity_preprocessing(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
| 314 |
# categorize features
|
| 315 |
+
print(data.columns)
|
| 316 |
+
data.loc[:, "race"] = data.race.apply(self.encode_race)
|
| 317 |
|
| 318 |
return data
|
| 319 |
|
|
|
|
| 325 |
|
| 326 |
def priors_prediction_preprocessing(self, data: pandas.DataFrame) -> pandas.DataFrame:
|
| 327 |
# categorize features
|
| 328 |
+
data.loc[:, "race"] = data.race.apply(self.encode_race)
|
| 329 |
|
| 330 |
return data
|
| 331 |
|