Skip to content

Commit 76e0356

Browse files
committed
fix use correct value labels in charts as group titles and update localization for conclusions
1 parent 93667d6 commit 76e0356

File tree

4 files changed

+25
-14
lines changed

4 files changed

+25
-14
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -420,14 +420,19 @@ def run():
420420
}
421421
}))
422422
423+
setResult(json.dumps({
424+
'type': 'text',
425+
'key': 'biasAnalysis.higherAverage' if p_val < 0.05 else 'biasAnalysis.noSignificance'
426+
}))
427+
423428
if p_val < 0.05:
424429
print("The most biased cluster has a significantly higher average bias metric than the rest of the dataset.")
425430
else:
426431
print("No significant difference in average bias metric between the most biased cluster and the rest of the dataset.")
427-
setResult(json.dumps({
428-
'type': 'heading',
429-
'headingKey': 'biasAnalysis.nodifference.heading',
430-
}))
432+
# setResult(json.dumps({
433+
# 'type': 'heading',
434+
# 'headingKey': 'biasAnalysis.nodifference.heading',
435+
# }))
431436
432437
setResult(json.dumps({
433438
'type': 'heading',
@@ -592,7 +597,7 @@ def run():
592597
593598
setResult(json.dumps({
594599
'type': 'text',
595-
'key': 'biasAnalysis.conclusionDescriptionHigherAverage' if p_val < 0.05 else 'biasAnalysis.conclusionNoSignificance'
600+
'key': 'biasAnalysis.conclusionDescription'
596601
}))
597602
598603
setResult(json.dumps({

src/components/composed-components/ClusterCategoriesDistributionAccordeonContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ const ClusterCategoriesDistributionAccordeonContent = ({
6060
(x: Record<string, number>, index: number) => {
6161
const translationID = getLabel(index);
6262
return {
63-
name: categories
64-
? categories[index]
63+
name: chart.categories
64+
? chart.categories[index]
6565
: t(
6666
translationID.key,
6767
translationID.params

src/locales/en.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,15 +353,12 @@ In this example, we analyze which group is most adversely affected by the risk p
353353
label: 'Choose cluster to show number of datapoints for',
354354
valueText: 'Number of datapoints in cluster {{index}}: {{value}}',
355355
},
356-
conclusion: `6. Conclusion and bias report`,
357-
conclusionDescriptionHigherAverage: `From the above figures and statistical tests, it can be concluded that:
356+
higherAverage: `The most biased cluster has a statistically significant higher average bias score than the rest of the dataset.`,
357+
noSignificance: `No statistically significant difference in average bias score between the most biased cluster and the rest of the dataset.`,
358358

359-
The most biased cluster has a statistically significant higher average bias score than the rest of the dataset.
360-
`,
361-
conclusionNoSignificance: `From the above figures and statistical tests, it can be concluded that:
359+
conclusion: `6. Conclusion and bias report`,
360+
conclusionDescription: `From the above figures and statistical tests, it can be concluded that:`,
362361

363-
No statistically significant difference in average bias score between the most biased cluster and the rest of the dataset.
364-
`,
365362
moreInformationHeading: `7. More information`,
366363
moreInformationDescription: `- [Scientific article](https://arxiv.org/pdf/2502.01713)
367364
- [Github repository](https://github.com/NGO-Algorithm-Audit/unsupervised-bias-detection)`,

src/locales/nl.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,15 @@ p_value : {{p_val}}
260260
heading:
261261
'De "{{variable}}" variabele verdeling over de verschillende clusters:',
262262
},
263+
higherAverage: `De meest bevooroordeelde cluster heeft een statistisch significant hogere gemiddelde bias score dan de rest van de dataset.`,
264+
noSignificance: `Geen statistisch significant verschil in gemiddelde bias score tussen de meest bevooroordeelde cluster en de rest van de dataset.`,
265+
266+
conclusion: `6. Conclusie en bias rapport`,
267+
conclusionDescription: `Uit de bovenstaande figuren en statistische tests kan worden geconcludeerd dat:`,
268+
269+
moreInformationHeading: `7. Meer informatie`,
270+
moreInformationDescription: `- [Scientific article](https://arxiv.org/pdf/2502.01713)
271+
- [Github repository](https://github.com/NGO-Algorithm-Audit/unsupervised-bias-detection)`,
263272
},
264273
heatmap: {
265274
realdata: 'Correlatie matrix van gekoppelde data',

0 commit comments

Comments
 (0)