From eae17b8f53032371407fedcfd01bf4c93cbe3e5e Mon Sep 17 00:00:00 2001 From: GrigoriJasnovidov Date: Mon, 8 Jan 2024 17:37:20 +0300 Subject: [PATCH] correct Linter errors --- tutorials/fairness_classification.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tutorials/fairness_classification.py b/tutorials/fairness_classification.py index a3026d9..eb8edeb 100644 --- a/tutorials/fairness_classification.py +++ b/tutorials/fairness_classification.py @@ -6,6 +6,8 @@ def print_results(res): + """This function prints results of fairness improvement algorithm.""" + accuracy_absolute_loss = res["accuracy_of_initial_classifier"] - res["accuracy_of_fair_classifier"] accuracy_percentage_loss = accuracy_absolute_loss / res["accuracy_of_initial_classifier"] * 100 fairness_absolute_improvement = res["fairness_of_initial_classifier_diff"] - res["fairness_of_fair_classifier_diff"] @@ -32,6 +34,8 @@ def print_results(res): def run(name, init_cl): + """Run experiment.""" + initial_classifier = init_cl if name == "LOAN": loan = pd.read_csv("loan_cleaned.csv")