Enhancing Transparency in Income Prediction: A SHAP-based Explainable AI Approach with Random Forest

Authors

DOI:

https://doi.org/10.29207/resti.v10i5.7461

Keywords:

explainable artificial intelligence, explainability model, income classification, random forest, SHAP

Abstract

Explainable Artificial Intelligence (XAI) has gained increasing importance as modern machine learning models operate as opaque black-box systems, limiting transparency and trust in automated decision-making. While most XAI frameworks merely focus on static post-hoc visualizations, this study goes beyond passive diagnostics by introducing an algorithmic recourse framework for income prediction. By integrating SHAP (SHapley Additive exPlanations) with an optimized Random Forest classifier trained on the UCI Adult Income dataset, we partition socio-economic attributes into actionable features (e.g., weekly working hours, education level) and immutable demographic variables (e.g., age, sex). The dataset was preprocessed using missing-value handling, categorical encoding, class balancing via SMOTE, and feature scaling. Hyperparameter tuning optimization determined that the configuration of 150 trees, a maximum depth of 15, and a minimum split size of 15 yielded peak training accuracy rates of 85.49%, 86.13%, and 86.05% respectively. The Random Forest model achieved strong predictive performance, yielding an accuracy of 84.68%, precision of 85.15%, recall of 84.68%, F1-score of 84.88%, and a high ROC-AUC of 90.95%. Global SHAP analysis identified relationship, marital status, and education as the primary drivers of income classification. Crucially, local instance-level counterfactual optimization demonstrates that strategically adjusting actionable features can successfully neutralize negative SHAP momentum and flip unfavorable low-income predictions (≤ 50K) into positive outcomes (>50K) while holding immutable traits perfectly constant. This integration demonstrates that combining Random Forest with an algorithmic recourse pipeline transforms AI from a descriptive transparency tool into an active, prescriptive mechanism that empowers data-driven decision-making and human solutions in socio-economic applications.

Downloads

Download data is not yet available.

References

[1] A. Holzinger, A. Saranti, C. Molnar, P. Biecek, and W. Samek, “Explainable AI Methods - A Brief Overview,” in Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), Springer Science and Business Media Deutschland GmbH, 2022, pp. 13–38. doi: 10.1007/978-3-031-04083-2_2.

[2] S. M. Lundberg and S.-I. Lee, “A Unified Approach to Interpreting Model Predictions,” in Advances in Neural Information Processing Systems, 2017. doi: 10.48550/arXiv.1705.07874.

[3] M. Li, H. Sun, Y. Huang, and H. Chen, “Shapley value: from cooperative game to explainable artificial intelligence,” Autonomous Intelligent Systems, vol. 4, no. 1, p. 2, Feb. 2024, doi: 10.1007/s43684-023-00060-8.

[4] P. Jamshidi, S. Nowaczyk, and M. Rahat, “Analysis of characteristic functions on Shapley values in Machine Learning,” in 2024 International Conference on Intelligent Environments (IE), IEEE, Jun. 2024, pp. 70–77. doi: 10.1109/IE61493.2024.10599897.

[5] L. Wu, “A review of the transition from Shapley values and SHAP values to RGE,” Statistics (Ber)., vol. 59, no. 5, pp. 1161–1183, Sep. 2025, doi: 10.1080/02331888.2025.2487853.

[6] B. Warner, E. Ratner, and A. Lendasse, “X-ELM: A Fast Explainability Approach for Extreme Learning Machines,” 2023, pp. 411–422. doi: 10.1007/978-3-031-43078-7_34.

[7] J. Pinem, W. Astuti, and Adiwijaya, “Explainable Ensemble Learning Framework with SMOTE, SHAP and LIME for Predicting 30-Day Readmission in Diabetic Patients,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 9, no. 5, pp. 983–990, Sep. 2025, doi: 10.29207/resti.v9i5.6977.

[8] P. S. R. Aditya and M. Pal, “Local Interpretable Model Agnostic Shap Explanations for machine learning models,” Oct. 2022, doi: https://doi.org/10.48550/arXiv.2210.04533.

[9] A. Scrivano, “Explainable Artificial Intelligence (XAI): Investigating Methods to Make AI Algorithms More Interpretable and Transparent,” Aug. 2025, doi: 10.31224/5205.

[10] H. Byeon and S. B. Shaheema, “Explainable AI: Techniques and Tools for Interpreting Deep Learning Models,” in Cutting-Edge Technologies in Innovations in Computer Science and Engineering, San International Scientific Publications, 2023. doi: 10.59646/csebookc10/004.

[11] D. Kulaklıoğlu, “Explainable AI: Enhancing Interpretability of Machine Learning Models,” Human Computer Interaction, vol. 8, no. 1, p. 91, Dec. 2024, doi: 10.62802/z3pde490.

[12] A. M. Salih et al., “A Perspective on Explainable Artificial Intelligence Methods: SHAP and LIME,” Advanced Intelligent Systems, vol. 7, no. 1, Jan. 2025, doi: 10.1002/aisy.202400304.

[13] N. L. Rane, S. K. Mallick, Ö. Kaya, and J. Rane, “Explainable and trustworthy artificial intelligence, machine learning, and deep learning,” in Applied Machine Learning and Deep Learning: Architectures and Techniques, Deep Science Publishing, 2024. doi: 10.70593/978-81-981271-4-3_9.

[14] M. Asfi, B. Warsito, and A. Wibowo, “Enhancing Explainable AI: Leveraging SHAP for Transparent Decision-Making in Machine Learning,” in 2024 Ninth International Conference on Informatics and Computing (ICIC), IEEE, Oct. 2024, pp. 1–6. doi: 10.1109/ICIC64337.2024.10956244.

[15] S. Lorch, J. Gebele, and P. Brune, “Towards Trustworthy AI: Evaluating SHAP and LIME for Facial Emotion Recognition,” 2025. doi: 10.24251/HICSS.2025.900.

[16] H. Malik, D. Dampier, and N. Jabeur, “Decoding Performance Testing Results: Empowering Trust with Explainable Artificial Intelligence (XAI),” in NAECON 2023 - IEEE National Aerospace and Electronics Conference, IEEE, Aug. 2023, pp. 116–121. doi: 10.1109/NAECON58068.2023.10365764.

[17] L. Widyawati and N. Sulistianingsih, “Explainable Ensemble Learning for Maternal Health Risk in Low-Resource Settings,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 9, no. 5, pp. 1121–1130, Oct. 2025, doi: 10.29207/resti.v9i5.6765.

[18] Y. Bokka, R. N. V. J. Mohan, and M. C. Naik, “SHAP-Driven Interpretability of Autism Risk in Pregnancy Using Explainable AI,” in 2024 International Conference on Integrated Intelligence and Communication Systems (ICIICS), IEEE, Nov. 2024, pp. 1–7. doi: 10.1109/ICIICS63763.2024.10859415.

[19] İ. Şahin, A. Ertürk, and E. Aptoula, “Band-Based Interpretability with SHAP for Hyperspectral Classification,” in 2023 31st Signal Processing and Communications Applications Conference (SIU), IEEE, Jul. 2023, pp. 1–4. doi: 10.1109/SIU59756.2023.10223795.

[20] R. Jinad, A. Islam, and N. Shashidhar, “Interpretability and Transparency of Machine Learning in File Fragment Analysis with Explainable Artificial Intelligence,” Electronics (Basel)., vol. 13, no. 13, p. 2438, Jun. 2024, doi: 10.3390/electronics13132438.

[21] Y. Gebreyesus, D. Dalton, D. De Chiara, M. Chinnici, and A. Chinnici, “AI for Automating Data Center Operations: Model Explainability in the Data Centre Context Using Shapley Additive Explanations (SHAP),” Electronics (Basel)., vol. 13, no. 9, p. 1628, Apr. 2024, doi: 10.3390/electronics13091628.

[22] X. Hu, A. Liu, X. Li, Y. Dai, and M. Nakao, “Explainable AI for customer segmentation in product development,” CIRP Annals, vol. 72, no. 1, pp. 89–92, 2023, doi: 10.1016/j.cirp.2023.03.004.

[23] B. K. R. Becker, “Adult dataset (UCI Machine Learning Repository,” 1996. doi: https://doi.org/10.24432/C5XW20.

[24] Rais, Agus Mohamad Soleh, and Budi Susetyo, “Rotation Double Random Forest Algorithm to Predict The Food Insecurity Status of Households,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 8, no. 1, pp. 33–41, Jan. 2024, doi: 10.29207/resti.v8i1.5540.

[25] H. Hairani, T. Widiyaningtyas, and D. Dwi Prasetya, “Addressing Class Imbalance of Health Data: A Systematic Literature Review on Modified Synthetic Minority Oversampling Technique (SMOTE) Strategies,” JOIV : International Journal on Informatics Visualization, vol. 8, no. 3, p. 1310, Sep. 2024, doi: 10.62527/joiv.8.3.2283.

[26] S. Tonati, M. Di Vece, R. Pellungrini, and F. Giannotti, “Ensemble Counterfactual Explanations for Churn Analysis,” 2025, pp. 332–347. doi: 10.1007/978-3-031-78980-9_21.

Downloads

Published

2026-09-28

Issue

Section

Artificial Intelligence

How to Cite

Asfi, M., Warsito, B., & Wibowo, A. (2026). Enhancing Transparency in Income Prediction: A SHAP-based Explainable AI Approach with Random Forest. Jurnal RESTI (Rekayasa Sistem Dan Teknologi Informasi), 10(5), 1215-1223. https://doi.org/10.29207/resti.v10i5.7461