FairnessOptions

Options & Configuration · AiDotNet.Evaluation.Options

Configuration options for fairness evaluation.

For Beginners

Fairness metrics check if your model discriminates against certain groups. For example, in loan approval:

  • Does the model approve men and women at similar rates? (Demographic Parity)
  • Is the model equally accurate for all races? (Equalized Odds)
  • When it predicts “will repay”, is it equally reliable for all groups? (Calibration)

Note: Different fairness metrics often conflict - you can’t optimize for all simultaneously.

How It Works

Fairness evaluation checks whether a model treats different demographic groups equitably. This is critical for applications in lending, hiring, criminal justice, healthcare, etc.

Constructors

Constructor Summary
FairnessOptions()

Properties

Property Summary
FairnessConstraint[] MetricsToCompute { get; set; } Fairness constraints to evaluate.
ReportFormat? ReportFormat { get; set; } Report format.
bool? ComputeConditionalFairness { get; set; } Whether to compute conditional fairness.
bool? ComputeConfidenceIntervals { get; set; } Whether to compute confidence intervals.
bool? ComputeCounterfactualFairness { get; set; } Whether to compute counterfactual fairness (requires causal model).
bool? ComputeIntersectionalFairness { get; set; } Whether to compute intersectional fairness.
bool? ComputeTheilDecomposition { get; set; } Whether to generate Theil index decomposition.
bool? FlagUnfairPredictions { get; set; } Whether to flag unfair predictions.
bool? IncludeRecommendations { get; set; } Whether to include recommendations.
bool? PerformSignificanceTests { get; set; } Whether to perform significance tests for disparities.
double? ConfidenceLevel { get; set; } Confidence level.
double? DisparityThreshold { get; set; } Threshold for flagging disparity.
double? IndividualUnfairnessThreshold { get; set; } Threshold for individual unfairness.
double? SignificanceLevel { get; set; } Significance level for tests.
int? BootstrapSamples { get; set; } Number of bootstrap samples.
int? MaxIntersectionSize { get; set; } Maximum intersection size.
int? MinGroupSize { get; set; } Minimum group size for reliable metrics.
int[] LegitimateFeatureIndices { get; set; } Legitimate feature indices for conditional fairness.
int[] ProtectedAttributeIndices { get; set; } Protected attribute column indices.
object[] PrivilegedGroupValues { get; set; } Reference/privileged group values for each protected attribute.
string[] ProtectedAttributeNames { get; set; } Protected attribute names for reporting.