Skip to content

Commit e6b0b35

Browse files
committed
Update _bahc.py
1 parent 9310cb6 commit e6b0b35

File tree

1 file changed

+3
-3
lines changed
  • unsupervised_bias_detection/cluster

1 file changed

+3
-3
lines changed

unsupervised_bias_detection/cluster/_bahc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def fit(self, X, y):
6565
clusters = []
6666
scores = []
6767
label = 0
68-
# The entire dataset has a discrimination score of zero
68+
# The entire dataset has bias metric zero
6969
score = 0
7070
heap = [(None, label, score)]
7171
for _ in range(self.bahc_max_iter):
@@ -89,7 +89,7 @@ def fit(self, X, y):
8989
len(indices0) >= self.bahc_min_cluster_size
9090
and len(indices1) >= self.bahc_min_cluster_size
9191
):
92-
# We calculate the discrimination scores using formula (1) in [1]
92+
# We calculate the bias metric using formula (1) in [1]
9393
mask0 = np.ones(n_samples, dtype=bool)
9494
mask0[indices0] = False
9595
score0 = np.mean(y[mask0]) - np.mean(y[indices0])
@@ -125,4 +125,4 @@ def fit(self, X, y):
125125
mapping = np.zeros(self.n_clusters_, dtype=np.uint32)
126126
mapping[clusters] = np.arange(self.n_clusters_, dtype=np.uint32)
127127
self.labels_ = mapping[labels]
128-
return self
128+
return self

0 commit comments

Comments
 (0)