We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 845c9a1 commit 6b7f82cCopy full SHA for 6b7f82c
src/Interpretability/DisparateImpactBiasDetector.cs
@@ -93,6 +93,11 @@ protected override BiasDetectionResult<T> GetBiasDetectionResult(
93
// If labels are available, compute TPR/FPR/Precision per group and Equal Opportunity difference.
94
if (actualLabels != null)
95
{
96
+ if (actualLabels.Length != predictions.Length)
97
+ {
98
+ throw new ArgumentException("Actual labels vector must have the same length as predictions.", nameof(actualLabels));
99
+ }
100
+
101
var groupTruePositiveRates = new Dictionary<string, T>();
102
var groupFalsePositiveRates = new Dictionary<string, T>();
103
var groupPrecisions = new Dictionary<string, T>();
0 commit comments