# Comprehensive Validation on Reweighting Samples for Bias Mitigation via AIF360
## 3 Results and Discussions
### Experimental Results and Discussion
#### 3.3.2. Compas  
To thoroughly assess the effectiveness of reweighting samples in mitigating bias, Figures 5 and 6 provide a performance comparison before and after reweighting samples for the protected attribute _Race_ in the COMPAS dataset. Similarly, prior to reweighting, various ML models exhibit diverse biases in the AOD and DI curves. Post-reweighting, DT models demonstrate a lack of bias in AOD while showing significant bias against unprivileged groups in DI values. Conversely, biases in LR, GNB, and RF show significant change over the classification threshold cycle as seen in the curves of AOD and DI. KNN became more bias after reweighing was applied. Figure 3: Performance comparison via BA vs. AOD before and after reweighting samples on Adult Income dataset with respect to the protected attribute _Sex_. Table 3 offers a systematic comparison using additional fairness metrics on the COMPAS dataset. Similar to the Adult Income dataset, DT's bias is eradicated concerning AOD, EOD, and TI values. However, biases persist in terms of SPD and DI values, showing a continued bias toward the unprivileged group. The LR and RF models displayed significant bias in favor of the unprivileged group. While GNB and KNN models experience slight reductions in BA, their fairness is marginally improved. Figure 4: Performance comparison via BA vs. DI before and after reweighting samples on Adult Income dataset with respect to the protected attribute _Sex_. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multicolumn{6}{c}{Performance before reweighting samples} \\ \hline
**Model** & BA & SPD & AOD & DI & EOD & TI \\ \hline DT & 0.6586 & \(-\)0.1516 & \(-\)0.0970 & 0.7791 & \(-\)0.1212 & 0.1835 \\ GNB & 0.6553 & \(-\)0.2483 & \(-\)0.1994 & 0.6155 & \(-\)0.1980 & 0.2382 \\ KNN & 0.6414 & \(-\)0.2139 & \(-\)0.1727 & 0.7282 & \(-\)0.1131 & 0.1607 \\ LR & 0.6774 & \(-\)0.2494 & \(-\)0.1927 & 0.6600 & \(-\)0.1877 & 0.1774 \\ RF & 0.6432 & \(-\)0.1539 & \(-\)0.1057 & 0.6873 & \(-\)0.1166 & 0.3003 \\ \hline \multicolumn{6}{c}{Performance after reweighting samples} \\ \hline DT & 1.0 & \(-\)0.1769 & 0.0 & 0.7060 & 0.0 & 0.0 \\ GNN & 0.6437 & \(-\)0.1782 & \(-\)0.1318 & 0.6926 & \(-\)0.1251 & 0.2594 \\ KNN & 0.6311 & \(-\)0.3432 & \(-\)0.3105 & 0.5945 & \(-\)0.2391 & 0.1762 \\ LR & 0.6342 & 0.0546 & 0.1042 & 1.1062 & 0.1215 & 0.2257 \\ RF & 0.6234 & 0.1459 & 0.1953 & 1.4012 & 0.1977 & 0.2867 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Performance comparison between before and after reweighting samples through one classification metric, BA, and fairness metrics including SPD, AOD, DI, EOD, and TI on COMPAS dataset regarding the protected attribute _Race_. Figure 5: Performance comparison via BA vs. AOD before and after reweighting samples on COMPAS dataset with respect to the protected attribute _Race_. Moreover, Figures 7 and 8 present comparison results for the protected attribute _Sex_. Similar observations are made, where reweighting samples are effective primarily for DT but less so for KNN. Notably, LR, GNB, and RF exhibit more significant effects after reweighting. Table 4 reveals similar trends, with DT showing bias in SPD and DI but less bias overall. All other models bias was reduced while retaining bias against the unpriveleged group. LR showed bias in favor of the unprivileged group for EOD. In summary, the figures and tables illustrate the impact of reweighting samples on bias mitigation in traditional machine-learning models for both the Adult Income and COMPAS datasets. Notably, DT models showcase effective bias reduction, while KNN exhibits more resistance to debiasing for the Adult Income dataset but work well with the COMPAS dataset. The trade-off between BA and fairness is evident. Results differ across protected attributes, emphasizing the nuanced effectiveness of reweighting. Comprehensive assessments, including additional fairness metrics, reveal the complexity of bias dynamics.