Skip to content

Commit de2ecf2

Browse files
authored
Merge pull request #100 from NGO-Algorithm-Audit/feature/ubdt-bias_score-not-in-dropdown
ook voor numerieke data de bias_score niet toevoegen aan de dropdown
2 parents 865dd31 + b1d4076 commit de2ecf2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/assets/bias-detection-python-code.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,8 @@ def run():
471471
472472
dropdownCategories = []
473473
for i, column in enumerate(X_test.columns):
474-
dropdownCategories.append(column)
474+
if column != bias_score:
475+
dropdownCategories.append(column)
475476
476477
# Plot bar charts for each variable, showing means for each cluster and overall mean as red line
477478
n_vars = len(variables)
@@ -521,7 +522,9 @@ def run():
521522
print("Statistically significant differences in means found.")
522523
else:
523524
# Create subplots for each column
524-
columns_to_analyze = decoded_X_test.columns[:-1] # Exclude 'cluster_label' column
525+
columns_to_analyze = [col for col in decoded_X_test.columns if col not in [bias_score, "cluster_label"]]
526+
527+
525528
rows = (len(columns_to_analyze) + 2) // 3 # Calculate the number of rows needed
526529
print(f"rows: {rows}")
527530

0 commit comments

Comments
 (0)