Reweighting algorithm for fairness

조회 수: 5 (최근 30일)
Esmeralda Ruiz Pujadas
Esmeralda Ruiz Pujadas 2023년 1월 20일
답변: Rohit 2023년 3월 24일
Hello,
I want to apply reweighting to mitigate fairness. I saw there is one way in matlab but when I use it, It does not do anything to the method. The results / predictions are exactly the same. What I do is the following:
fairWeights = fairnessWeights(trainingData,attributename,"Eval");
predictors.Weights= fairWeights;
classificationSVM = fitcsvm(...
predictors, ...
response, ...
'KernelFunction','rbf',...
'OptimizeHyperparameters','auto','HyperparameterOptimizationOptions',
opts,'Standardize',true,Weights=
"Weights");
and predictors contain the fair weights-
fitcsvm returns the same predictions without weights. How can I do reweighting in matlab then?. The example of matlab has a initial weight as a predictor so it does not make sense as in a real example you do not have weights computed as a features in the model.
Thank you

답변 (1개)

Rohit
Rohit 2023년 3월 24일
Hi Esmeralda,
Since I do not have access to data and know which feature you are using to get new weights, predicting the exact reason for your issue is hard. But here are a few things you can try to troubleshoot the issue:
  1. Verify that the fairnessWeights function is returning non-uniform weights. You can do this by printing out the values of fairWeights and checking that they are different from each other.
  2. Ensure that the fairness issue you are trying to mitigate is present in the data. If the data is already fair, reweighting may not have any effect on the predictions.
Please refer to the following MathWorks documentation to understand and visualize fairness weights: https://www.mathworks.com/help/stats/fairnessweights.html

카테고리

Help CenterFile Exchange에서 Classification Ensembles에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by