BiasDetectorBase<T>

Base Classes · AiDotNet.Interpretability

Base class for all bias detectors that identify unfair treatment in model predictions.

Implements: IBiasDetector<T>

Known derived types: DemographicParityBiasDetector<T>, DisparateImpactBiasDetector<T>, EqualOpportunityBiasDetector<T>

For Beginners

This is a foundation class that all bias detectors build upon.

Think of a bias detector like an inspector checking for fairness:

  • It examines how your model makes predictions for different groups of people
  • It identifies when certain groups are being treated unfairly
  • It provides metrics that measure the severity of the bias

Different bias detectors might look for different types of unfairness, but they all share common functionality. This base class provides that shared foundation.

Properties

Property Summary
bool IsLowerBiasBetter { get; } Gets a value indicating whether lower bias scores represent better (fairer) models.

Methods

Method Summary
BiasDetectionResult<T> DetectBias(Vector<T> predictions, Vector<T> sensitiveFeature, Vector<T> actualLabels) Detects bias in model predictions by analyzing predictions across different groups.
bool IsBetterBiasScore(T currentBias, T bestBias) Determines whether a new bias score represents better (fairer) performance than the current best score.