Datasets:
Upload compas.py
Browse files
compas.py
CHANGED
@@ -73,17 +73,15 @@ _BASE_FEATURE_NAMES = [
|
|
73 |
"decile_score",
|
74 |
"number_of_juvenile_misdemeanors",
|
75 |
"number_of_other_juvenile_offenses",
|
76 |
-
"
|
77 |
"days_before_screening_arrest",
|
78 |
"is_recidivous",
|
|
|
79 |
"days_of_recidividity_after_arrest",
|
80 |
-
"days_in_jail_before_recidividity",
|
81 |
-
"days_in_custody",
|
82 |
"is_violent_recidivous",
|
83 |
"violence_decile_score",
|
84 |
-
"
|
85 |
-
"
|
86 |
-
"two_year_recidivous"
|
87 |
]
|
88 |
DESCRIPTION = "COMPAS dataset for recidivism prediction."
|
89 |
_HOMEPAGE = "https://github.com/propublica/compas-analysis"
|
@@ -262,6 +260,8 @@ class Compas(datasets.GeneratorBasedBuilder):
|
|
262 |
data.drop("compas_screening_date", axis="columns", inplace=True)
|
263 |
data.drop("decile_score.1", axis="columns", inplace=True)
|
264 |
data.drop("priors_count.1", axis="columns", inplace=True)
|
|
|
|
|
265 |
|
266 |
# drop nan values
|
267 |
data = data[~data.days_b_screening_arrest.isna()]
|
|
|
73 |
"decile_score",
|
74 |
"number_of_juvenile_misdemeanors",
|
75 |
"number_of_other_juvenile_offenses",
|
76 |
+
"number_of_prior_offenses",
|
77 |
"days_before_screening_arrest",
|
78 |
"is_recidivous",
|
79 |
+
# "days_in_jail_before_recidividity",
|
80 |
"days_of_recidividity_after_arrest",
|
|
|
|
|
81 |
"is_violent_recidivous",
|
82 |
"violence_decile_score",
|
83 |
+
"two_year_recidivous",
|
84 |
+
"days_in_custody",
|
|
|
85 |
]
|
86 |
DESCRIPTION = "COMPAS dataset for recidivism prediction."
|
87 |
_HOMEPAGE = "https://github.com/propublica/compas-analysis"
|
|
|
260 |
data.drop("compas_screening_date", axis="columns", inplace=True)
|
261 |
data.drop("decile_score.1", axis="columns", inplace=True)
|
262 |
data.drop("priors_count.1", axis="columns", inplace=True)
|
263 |
+
data.drop("c_case_number", axis="columns", inplace=True)
|
264 |
+
data.drop("c_days_from_compas", axis="columns", inplace=True)
|
265 |
|
266 |
# drop nan values
|
267 |
data = data[~data.days_b_screening_arrest.isna()]
|