Class FairnessMetrics<T>
- Namespace
- AiDotNet.Interpretability
- Assembly
- AiDotNet.dll
Represents fairness metrics for model evaluation.
public class FairnessMetrics<T>
Type Parameters
TThe numeric type for calculations.
- Inheritance
-
FairnessMetrics<T>
- Inherited Members
Constructors
FairnessMetrics(T, T, T, T, T, T)
Initializes a new instance of the FairnessMetrics class with all metric values.
public FairnessMetrics(T demographicParity, T equalOpportunity, T equalizedOdds, T predictiveParity, T disparateImpact, T statisticalParityDifference)
Parameters
demographicParityTThe demographic parity metric value.
equalOpportunityTThe equal opportunity metric value.
equalizedOddsTThe equalized odds metric value.
predictiveParityTThe predictive parity metric value.
disparateImpactTThe disparate impact metric value.
statisticalParityDifferenceTThe statistical parity difference metric value.
Exceptions
- ArgumentNullException
Thrown when any parameter is null and T is a reference type.
Properties
AdditionalMetrics
Gets or sets additional fairness metrics.
public Dictionary<string, T> AdditionalMetrics { get; set; }
Property Value
- Dictionary<string, T>
DemographicParity
Gets or sets the demographic parity metric value.
public T DemographicParity { get; set; }
Property Value
- T
DisparateImpact
Gets or sets the disparate impact metric value.
public T DisparateImpact { get; set; }
Property Value
- T
EqualOpportunity
Gets or sets the equal opportunity metric value.
public T EqualOpportunity { get; set; }
Property Value
- T
EqualizedOdds
Gets or sets the equalized odds metric value.
public T EqualizedOdds { get; set; }
Property Value
- T
PredictiveParity
Gets or sets the predictive parity metric value.
public T PredictiveParity { get; set; }
Property Value
- T
SensitiveFeatureIndex
Gets or sets the sensitive feature index used for fairness evaluation.
public int SensitiveFeatureIndex { get; set; }
Property Value
StatisticalParityDifference
Gets or sets the statistical parity difference metric value.
public T StatisticalParityDifference { get; set; }
Property Value
- T