Skip to content

Commit 78b3be1

Browse files
committed
section 6 in report has explainer text when p > 0.05
1 parent f7ae453 commit 78b3be1

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,15 @@ def run():
614614
'titleKey': "biasAnalysis.distributionOfFeaturesAcrossClustersAccordeonTitle",
615615
'defaultValue': columns_to_analyze[0]
616616
}))
617-
617+
else:
618+
setResult(json.dumps({
619+
'type': 'text',
620+
'key': 'biasAnalysis.distribution.noResultsClusterDifferences',
621+
'params': {
622+
'biasVariable': bias_variable
623+
}
624+
}))
625+
618626
df_most_biased_cluster = most_biased_cluster_df
619627
df_other = rest_df
620628

src/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ For categorical data a two-sided Z-test, while for numerical data a two-sided t-
393393
distribution: {
394394
mainHeading: '6. Cluster differences wrt. features',
395395
heading: '"{{variable}}" distribution per cluster:',
396+
noResultsClusterDifferences: `No results for cluster differences with respect to features are shown, because there is no statistically significant difference in {{biasVariable}} between the most deviating cluster and the rest of the dataset.`,
396397
},
397398
splittingDataset: {
398399
heading: '3. Splitting dataset',

src/locales/nl.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ Een eenzijdige Z-toets wordt uitgevoerd:
350350
distribution: {
351351
mainHeading: '6. Cluster verschillen mbt. eigenschappen',
352352
heading: '"{{variable}}" verdeling per cluster:',
353+
noResultsClusterDifferences: `Er worden geen resultaten getoond voor clusterverschillen met betrekking tot kenmerken, omdat er geen statistisch significant verschil is in {{biasVariable}} tussen het meest afwijkende cluster en de rest van de dataset.`,
353354
},
354355
splittingDataset: {
355356
heading: '3. Splitsen dataset',

0 commit comments

Comments
 (0)