Skip to content

Commit b1d4076

Browse files
committed
ook voor numerieke data de bias_score niet toevoegen aan de dropdown
1 parent 865dd31 commit b1d4076

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)