diff --git a/tests/test_general/bar_pass_data_preparing.py b/tests/test_general/bar_pass_data_preparing.py index 9e81742..3efb451 100644 --- a/tests/test_general/bar_pass_data_preparing.py +++ b/tests/test_general/bar_pass_data_preparing.py @@ -21,9 +21,28 @@ def grouper_gpa(x): def prepare_data(name="bar_pass_prediction"): if name == "bar_pass_prediction": d = pd.read_csv("bar_pass_prediction.csv") - for x in ["ID", "race1", "race2", "sex", "bar", "dnn_bar_pass_prediction", "pass_bar", "indxgrp2", - "gender", "grad", "Dropout", "fulltime", "lsat", "zfygpa", "ugpa", "zgpa", "other", "asian", - "black", "hisp"]: + for x in [ + "ID", + "race1", + "race2", + "sex", + "bar", + "dnn_bar_pass_prediction", + "pass_bar", + "indxgrp2", + "gender", + "grad", + "Dropout", + "fulltime", + "lsat", + "zfygpa", + "ugpa", + "zgpa", + "other", + "asian", + "black", + "hisp" + ]: del d[x] d["gpa"] = d["gpa"].apply(grouper_gpa) diff --git a/tests/test_general/test_fairness.py b/tests/test_general/test_fairness.py index 9f68945..bf4d5ca 100644 --- a/tests/test_general/test_fairness.py +++ b/tests/test_general/test_fairness.py @@ -65,9 +65,7 @@ def test_fairness(): dataset = prepare_data() cl = LGBMClassifier(verbose=-1) fairness = Fair(dataset, estimator=cl) - res = fairness.run(number_iterations=20, - interior_classifier='knn', - multiplier=50) + res = fairness.run(number_iterations=20, interior_classifier="knn", multiplier=50) assert res["accuracy_of_initial_classifier"] - res["accuracy_of_fair_classifier"] <= 0.5 assert res["fairness_of_fair_classifier_diff"] <= res["fairness_of_initial_classifier_diff"]