Skip to content

Commit

Permalink
linter4
Browse files Browse the repository at this point in the history
  • Loading branch information
GrigoriJasnovidov committed Jan 9, 2024
1 parent 20ca87d commit c25e578
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/test_general/test_fairness.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from lightgbm import LGBMClassifier

from stable_gnn.fairness import Fair
Expand Down Expand Up @@ -63,13 +62,12 @@ def simple_splitter(arr):


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"]

0 comments on commit c25e578

Please sign in to comment.