Table of Contents

Class EqualOpportunityBiasDetector<T>

Namespace
AiDotNet.Interpretability
Assembly
AiDotNet.dll

Detects bias using Equal Opportunity metric (True Positive Rate difference). Requires actual labels to compute TPR for each group. A TPR difference greater than 0.1 (10%) indicates potential bias.

public class EqualOpportunityBiasDetector<T> : BiasDetectorBase<T>, IBiasDetector<T>

Type Parameters

T

The numeric type for calculations.

Inheritance
EqualOpportunityBiasDetector<T>
Implements
Inherited Members

Constructors

EqualOpportunityBiasDetector(double)

Initializes a new instance of the EqualOpportunityBiasDetector class.

public EqualOpportunityBiasDetector(double threshold = 0.1)

Parameters

threshold double

The threshold for detecting bias (default is 0.1, representing 10% difference threshold).

Methods

GetBiasDetectionResult(Vector<T>, Vector<T>, Vector<T>?)

Implements bias detection using Equal Opportunity (TPR difference).

protected override BiasDetectionResult<T> GetBiasDetectionResult(Vector<T> predictions, Vector<T> sensitiveFeature, Vector<T>? actualLabels)

Parameters

predictions Vector<T>
sensitiveFeature Vector<T>
actualLabels Vector<T>

Returns

BiasDetectionResult<T>