Development of a Flask-based Application for Bank Customer Churn Prediction as a Decision Support Tool

Suluh Arif Wibowo, Muhammad Rezky, Ali Ibrahim, Mira Afrina, Fathoni Fathoni

Abstract


Customer churn prediction is a crucial aspect of the banking industry for maintaining customer loyalty and reducing the cost of acquiring new customers. This study aims to develop a web-based decision support system capable of predicting potential customer churn using the Gradient Boosting Machine (GBM) algorithm. The dataset used is the Bank Customer Churn Dataset, consisting of 10,000 customer records with 14 attributes. The research stages include exploratory data analysis and preprocessing, which involves data cleaning, categorical feature encoding, feature engineering (BalanceSalaryRatio, TenureByAge, CreditScoreGivenAge), and data balancing using SMOTE to address class imbalance. The GBM model was trained on the balanced dataset and evaluated using accuracy, precision, recall, and F1-score metrics. The evaluation results show that the model achieved an accuracy of 83.95%, with a recall of 67.32% for the churn class, indicating a strong capability in identifying customers at risk of churn. Feature importance analysis reveals that Age and NumOfProducts are the most dominant features, contributing approximately 77% to the prediction.
The model was then implemented in a Flask-based web application with an HTML and CSS interface, enabling non-technical users to perform real-time churn predictions. This system is expected to assist banking institutions in designing more targeted and data-driven customer retention strategies.

Keywords


churn prediction; decision support system; flask; gradient boosting machine; SMOTE

Full Text:

PDF

References


P. P. Singh, F. I. Anik, R. Senapati, A. Sinha, N. Sakib, and E. Hossain, “Investigating Customer Churn in Banking: A Machine Learning Approach and Visualization App for Data Science and Management,” Data SCI. Manag., Vol. 7, No. 1, pp. 7–16, 2024, DOI: https://doi.org/10.1016/j.dsm.2023.09.002.

P. Boozary, S. Sheykhan, H. GhorbanTanhaei, and C. Magazzino, “Enhancing Customer Retention with Machine Learning: A Comparative Analysis of Ensemble Models for Accurate Churn Prediction,” Int. J. Inf. Manag. Data Insights, Vol. 5, No. 1, p. 100331, 2025, DOI: https://doi.org/10.1016/j.jjimei.2025.100331.

Y. K. Dwivedi et al., “Artificial Intelligence (AI): Multidisciplinary Perspectives on Emerging Challenges, Opportunities, and Agenda for Research, Practice and Policy,” Int. J. Inf. ManAge., Vol. 57, p. 101994, 2021, DOI: https://doi.org/10.1016/j.ijinfomgt.2019.08.002.

A. De Caigny, K. W. De Bock, and S. Verboven, “Hybrid Black-Box Classification for Customer Churn Prediction with Segmented Interpretability Analysis,” Decis. Support Syst., Vol. 181, p. 114217, 2024, DOI: https://doi.org/10.1016/j.dss.2024.114217.

S. S. Poudel, S. Pokharel, and M. Timilsina, “Explaining Customer Churn Prediction in Telecom Industry using Tabular Machine Learning Models,” Mach. Learn. with Appl., Vol. 17, p. 100567, 2024, DOI: https://doi.org/10.1016/j.mlwa.2024.100567.

R. A. de Lima Lemos, T. C. Silva, and B. M. Tabak, “Propension to Customer Churn in a Financial Institution: A Machine Learning Approach,” Neural Comput. Appl., Vol. 34, No. 14, pp. 11751–11768, 2022, DOI: 10.1007/s00521-022-07067-x.

K. Peng, Y. Peng, and W. Li, “Research on Customer Churn Prediction and Model Interpretability Analysis,” PLoS One, Vol. 18, No. 12, pp. 1–26, 2023, DOI: 10.1371/journal.pone.0289724.

M. Imani, M. Joudaki, A. Beikmohammadi, and H. R. Arabnia, “Customer Churn Prediction: A Systematic Review of Recent Advances, Trends, and Challenges in Machine Learning and Deep Learning,” Mach. Learn. Knowl. Extr., Vol. 7, No. 3, 2025, DOI: 10.3390/make7030105.

P. P. Šimović, C. Y. T. Chen, and E. W. Sun, “Classifying the Variety of Customers’ Online EngAgement for Churn Prediction with a Mixed-Penalty Logistic Regression,” Comput. Econ., Vol. 61, No. 1, pp. 451–485, 2023, DOI: 10.1007/s10614-022-10275-1.

R. Krishna, D. Jayanthi, D. S. Shylu Sam, K. Kavitha, N. K. Maurya, and T. Benil, “Application of Machine Learning Techniques for Churn Prediction in the Telecom Business,” Results Eng., Vol. 24, p. 103165, 2024, DOI: https://doi.org/10.1016/j.rineng.2024.103165.

T. Gattermann-Itschert and U. W. Thonemann, “Proactive Customer Retention Management in a Non-Contractual B2B Setting based on Churn Prediction with Random Forests,” Ind. Mark. Manag., Vol. 107, pp. 134–147, 2022, DOI: https://doi.org/10.1016/j.indmarman.2022.09.023.

I. AlShourbaji, N. Helian, Y. Sun, A. G. Hussien, L. Abualigah, and B. Elnaim, “An Efficient Churn Prediction Model using Gradient Boosting Machine and Metaheuristic Optimization,” Sci. Rep., Vol. 13, No. 1, p. 14441, 2023, DOI: 10.1038/s41598-023-41093-6.

Z. Liu, P. Jiang, K. W. De Bock, J. Wang, L. Zhang, and X. Niu, “Extreme Gradient Boosting Trees with Efficient Bayesian Optimization for Profit-Driven Customer Churn Prediction,” Technol. Forecast. Soc. Change, Vol. 198, p. 122945, 2024, DOI: https://doi.org/10.1016/j.techfore.2023.122945.

I. H. Sugozu, C. Verberi, and S. Yasar, “Machine Learning Approaches to Credit Risk: Evaluating Turkish Participation and Conventional Banks,” Borsa Istanbul Rev., Vol. 25, No. 3, pp. 497–512, 2025, DOI: https://doi.org/10.1016/j.bir.2025.02.001.

S. K. Rajput et al., “Forecasting Capacitor Banks for Improving Efficiency of Grid-Integrated PV Plants: A Machine Learning Approach,” Energy Reports, Vol. 13, pp. 140–160, 2025, DOI: https://doi.org/10.1016/j.egyr.2024.12.011.

M. M. Mariani, I. Machado, V. Magrelli, and Y. K. Dwivedi, “Artificial Intelligence in Innovation Research: A Systematic Review, Conceptual Framework ,and Future Research Directions,” Technovation, Vol. 122, p. 102623, 2023, DOI: https://doi.org/10.1016/j.technovation.2022.102623.

M. I. Reis, J. N. C. Gonçalves, P. Cortez, M. S. Carvalho, and J. M. Fernandes, “A Context-Aware Decision Support System for Selecting Explainable Artificial Intelligence Methods in Business Organizations,” Comput. Ind., Vol. 165, p. 104233, 2025, DOI: https://doi.org/10.1016/j.compind.2024.104233.

J. K. Sana, M. S. Rahman, and M. S. Rahman, “Privacy-Preserving Customer Churn Prediction Model in the Context of Telecommunication Industry,” Eng. Appl. Artif. Intell., Vol. 162, p. 112514, 2025, DOI: https://doi.org/10.1016/j.engappai.2025.112514.

R. Zhou, Y. Cui, and B. Hu, “Research on MBTI Testing System based on the Combination of Flask Framework and ORM Technology,” in 2023 IEEE 3rd International Conference on Data Science and Computer Application (ICDSCA), 2023, pp. 1582–1585. DOI: 10.1109/ICDSCA59871.2023.10393033.

M. EskandariNasab, S. M. Hamdi, and S. Filali Boubrahimi, “FlaPLeT: A Full-Stack Web Platform for End-to-End Time Series Data Processing and Machine Learning in Solar Flare Prediction,” SoftwareX, Vol. 33, p. 102540, 2026, DOI: https://doi.org/10.1016/j.softx.2026.102540.




DOI: https://doi.org/10.32520/stmsi.v15i4.6257

Article Metrics

Abstract view : 4 times
PDF - 0 times

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.