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:
- 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.
- 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