Main Content

二类分类中的公平性

研究二类分类中的公平性

为了检测和减轻二类分类中的社会性偏向,您可以使用 Statistics and Machine Learning Toolbox™ 中的 fairnessMetricsfairnessWeightsdisparateImpactRemoverfairnessThresholder 函数。首先,使用 fairnessMetrics 根据偏向和组度量评估数据集或分类模型的公平性。然后,使用 fairnessWeights 对观测值重新加权,使用 disparateImpactRemover 消除敏感属性所带来的差别影响,或使用 fairnessThresholder 优化分类阈值。

fairnessWeightsdisparateImpactRemover 函数提供预处理方法,可用于在训练(或重新训练)分类器之前调整预测变量数据。fairnessThresholder 函数提供一种后处理方法,用于调整已训练分类器的预测边界附近的标签。要评估最终的模型行为,您可以使用 fairnessMetrics 函数以及各种可解释性函数。有关详细信息,请参阅Interpret Machine Learning Models

函数

全部展开

fairnessMetricsBias and group metrics for a data set or classification model (自 R2022b 起)
reportGenerate fairness metrics report (自 R2022b 起)
plotPlot bar graph of fairness metric (自 R2022b 起)
fairnessWeightsReweight observations for fairness in binary classification (自 R2022b 起)
disparateImpactRemoverRemove disparate impact of sensitive attribute (自 R2022b 起)
transformTransform new predictor data to remove disparate impact (自 R2022b 起)
fairnessThresholderOptimize classification threshold to include fairness (自 R2023a 起)
lossClassification loss adjusted by fairness threshold (自 R2023a 起)
predictPredicted labels adjusted by fairness threshold (自 R2023a 起)

主题