Automatic classification of electrical complaints using decision trees and random forest: an applied study at CNEL EP

Main Article Content

Francisco Javier Carpio Velasco
Gloria Margarita Garcés Beltrán

Abstract

This study presents an automated classification system to prioritize electrical service complaints at CNEL EP. A total of 143,113 real records were processed through data cleaning, missing-value imputation, and the engineering of predictive variables reflecting complaint urgency and recurrence. Based on these criteria, the target variable “Priority” was defined to distinguish high-priority from normal complaints. Supervised learning models, specifically Decision Tree and Random Forest, were then trained using one-hot encoding and cross-validation. Random Forest delivered the best performance, achieving 91% accuracy and an AUC-ROC of 0.89. These results indicate that the proposed system can significantly improve technical resource allocation and reduce response times for electrical complaints. Moreover, the study demonstrates the feasibility of integrating machine-learning techniques into the operational management of electric distribution companies, enabling future enhancements and real-time deployment.

Article Details

Section
Scientific Paper

References

[1] R. Walters, E. J. Jaselskis, and J. M. Kurtenbach, “Classification of Knowledge within the Electrical Contracting Industry: A Case Study,” Leadership and Management in Engineering, vol. 7, no. 1, pp. 11–17, 2007. [Online]. Available: https://doi.org/10.1061/(ASCE)1532-6748(2007)7:1(11)

[2] P. Gaiardelli, B. Resta, V. Martínez, R. Pinto, and P. Albores, “A classification model for product-service offerings,” Journal of Cleaner Production, vol. 66, pp. 507–519, Mar. 2014. [Online]. Available: https://doi.org/10.1016/j.jclepro.2013.11.032

[3] G. Chicco, R. Napoli, F. Piglione, P. Postolache, M. Scutariu, and C. Toader, “Emergent electricity customer classification,” IEE Proceedings - Generation, Transmission and Distribution, vol. 152, no. 2, p. 164, 2005. [Online]. Available: https://upsalesiana.ec/ing35ar6r3

[4] ——, “Load Pattern-Based Classification of Electricity Customers,” IEEE Transactions on Power Systems, vol. 19, no. 2, pp. 1232–1239, May 2004. [Online]. Available: https://doi.org/10.1109/TPWRS.2004.826810

[5] G. Wacker and R. Billinton, “Customer cost of electric service interruptions,” Proceedings of the IEEE, vol. 77, no. 6, pp. 919–930, Jun. 1989. [Online]. Available: https://doi.org/10.1109/5.29332

[6] C. Beckel, L. Sadamori, and S. Santini, “Towards automatic classification of private households using electricity consumption data,” in Proceedings of the Fourth ACM Workshop on Embedded Sensing Systems for Energy-Efficiency in Buildings, ser. SenSys ’12. ACM, Nov. 2012, pp. 169–176. [Online]. Available: https://doi.org/10.1145/2422531.2422562

[7] H. M. Ahmed, “The effect of customer complaint handling practices on customer satisfaction in ethiopian electric utility customer service center,” International Journal of Management (IJM), vol. 15, no. 1, 2024. [Online]. Available: https://upsalesiana.ec/ing35ar6r7

[8] G. F. Calderón Intriago, J. C. Mera Macías, and J. C. Guamán Segarra, “El mercado eléctrico ecuatoriano y su incidencia en los altos costos de las tarifas de energía eléctrica a los consumidores residenciales y comerciales en la provincia de manabí comprendidos en el periodo de enero a diciembre del 2018.” Revista de Investigaciones en Energía, Medio Ambiente y Tecnología: RIEMAT, vol. 3, no. 2, p. 24, Dec. 2018. [Online]. Available: https://doi.org/10.33936/riemat.v3i2.1627

[9] A. K. Montesdeoca Rivas and M. Cedillo Fajardo, “Análisis de la calidad de servicio y la satisfacción del usuario externo en la empresa eléctrica pública estratégica corporación nacional de electricidad CNEL EP, Guayaquil–2020,” Ciencia Latina Revista Científica Multidisciplinar, vol. 7, no. 3, pp. 9840–9858, Jul. 2023. [Online]. Available: https://doi.org/10.37811/cl_rcm.v7i3.7009

[10] C. A. Vásconez-Mejía, J. F. Molina-Mora, and M. E. Gaspar-Santos, “Derechos de los consumidores del servicio eléctrico en tiempos de pandemia en Ecuador,” CIENCIAMATRIA, vol. 8, no. 2, pp. 80–91, Mar. 2022. [Online]. Available: https://doi.org/10.35381/cm.v8i2.698

[11] M. Neira and R. Quintanilla, “La calidad del servicio técnico de electricidad,” Revista Técnica “Energía”, vol. 8, no. 1, Jan. 2012. [Online]. Available: https://doi.org/10.37116/revistaenergia.v8.n1.2012.189

[12] C. C. Orozco Domínguez, A. F. Sánchez Hernández, and M. J. Santiago Camacho, “Deficiencias en la prestación del servicio de energía eléctrica en la ciudad de Cartagena,” Vis Iuris, pp. 55–74, Nov. 2017. [Online]. Available: https://doi.org/10.22518/vis.v0i00.1174

[13] G. E. Chodzaza and H. S. Gombachika, “Service quality, customer satisfaction and loyalty among industrial customers of a public electricity utility in Malawi,” International Journal of Energy Sector Management, vol. 7, no. 2, pp. 269–282, Jun. 2013. [Online]. Available: https://doi.org/10.1108/IJESM-02-2013-0003

[14] S. Abideen, O. Joseph, J. Surajudeen, and A. Adeyinka, “Service quality and customer satisfaction of electricity distribution company: A study of Olumo Business Hub, Abeokuta, Ogun State,” SSRN Electronic Journal, 2018. [Online]. Available: https://doi.org/10.2139/ssrn.3391404

[15] W. Li, W. W. Kwabla Pomegbe, C. S. Kofi Dogbe, and J. D. Novixoxo, “Employees’ customer orientation and customer satisfaction in the public utility sector: The mediating role of service quality,” African Journal of Economic and Management Studies, vol. 10, no. 4, pp. 408–423, Dec. 2019. [Online]. Available: https://doi.org/10.1108/AJEMS-10-2018-0314

[16] D. Sarathkumar, M. Srinivasan, A. A. Stonier, R. Samikannu, N. R. Dasari, and R. A. Raj, “A technical review on classification of various faults in smart grid systems,” IOP Conference Series: Materials Science and Engineering, vol. 1055, no. 1, p. 012152, Feb. 2021. [Online]. Available: https://doi.org/10.1088/1757-899X/1055/1/012152

[17] A. S. Alhanaf, H. H. Balik, and M. Farsadi, “Intelligent fault detection and classification schemes for smart grids based on deep neural networks,” Energies, vol. 16, no. 22, p. 7680, Nov. 2023. [Online]. Available: https://doi.org/10.3390/en16227680

[18] Z. Krivohlava, S. Chren, and B. Rossi, “Failure and fault classification for smart grids,” Energy Informatics, vol. 5, no. 1, Oct. 2022. [Online]. Available: https://doi.org/10.1186/s42162-022-00218-3

[19] J. Hosseinzadeh, F. Masoodzadeh, and E. Roshandel, “Fault detection and classification in smart grids using augmented K-NN algorithm,” SN Applied Sciences, vol. 1, no. 12, Nov. 2019. [Online]. Available: https://doi.org/10.1007/s42452-019-1672-0

[20] M. Mohammadian, F. Aminifar, N. Amjady, and M. Shahidehpour, “Data-driven classifier for extreme outage prediction based on Bayes decision theory,” IEEE Transactions on Power Systems, vol. 36, no. 6, pp. 4906–4914, Nov. 2021. [Online]. Available: https://doi.org/10.1109/TPWRS.2021.3086031

[21] S. Rana, “AI-driven fault detection and predictive maintenance in electrical power systems: A systematic review of data-driven approaches, digital twins, and self-healing grids,” American Journal of Advanced Technology and Engineering Solutions, vol. 1, no. 01, pp. 258–289, Feb. 2025. [Online]. Available: https://doi.org/10.63125/4p25x993

[22] Z. Sun, G. Wang, P. Li, H. Wang, M. Zhang, and X. Liang, “An improved random forest based on the classification accuracy and correlation measurement of decision trees,” Expert Systems with Applications, vol. 237, p. 121549, Mar. 2024. [Online]. Available: https://doi.org/10.1016/j.eswa.2023.121549

[23] H. Jing, H. Cao, and S. Sun, “Multiobjective predictive maintenance optimization of electric energy meters based on LSTMXGBoost and modified firefly algorithm,” International Journal of Emerging Electric Power Systems, Aug. 2025. [Online]. Available: https://doi.org/10.1515/ijeeps-2025-0184

[24] I. Hussain, K. B. Ching, C. Uttraphan, K. G. Tay, and A. Noor, “Evaluating machine learning algorithms for energy consumption prediction in electric vehicles: A comparative study,” Scientific Reports, vol. 15, no. 1, May 2025. [Online]. Available: https://doi.org/10.1038/s41598-025-94946-7

[25] Y. Khalili, M. Ahmadi, and M. K. Moraveji, “Time-aware predictive maintenance of electrical submersible pumps using catboost ensemble learning and trend-based labeling,” Journal of Petroleum Exploration and Production Technology, vol. 15, no. 9, Aug. 2025. [Online]. Available: https://doi.org/10.1007/s13202-025-02070-z

[26] T. Ahmad, H. Chen, R. Huang, G. Yabin, J. Wang, J. Shair, H. M. Azeem Akram, S. A. Hassnain Mohsan, and M. Kazim, “Supervised based machine learning models for short, medium and long-term energy prediction in distinct building environment,” Energy, vol. 158, pp. 17–32, Sep. 2018. [Online]. Available: https://doi.org/10.1016/j.energy.2018.05.169

[27] T. Zhang, R. Gao, and S. Sun, “Theories, applications and trends of non-technical losses in power utilities using machine learning,” in 2018 2nd IEEE Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC). IEEE, May 2018, pp. 2324–2329. [Online]. Available: https://doi.org/10.1109/imcec.2018.8469410

[28] J. Ausmus, R. S. de Carvalho, A. Chen, Y. N. Velaga, and Y. Zhang, “Big data analytics and the electric utility industry,” in 2019 International Conference on Smart Grid Synchronized Measurements and Analytics (SGSMA). IEEE, May 2019. [Online]. Available: https://doi.org/10.1109/SGSMA.2019.8784657

[29] M. J. Mousavi, J. Stoupis, and K. Saarinen, “Event zone identification in electric utility systems using statistical machine learning,” in 2018 IEEE/PES Transmission and Distribution Conference and Exposition (T&D). IEEE, Apr. 2018, pp. 1–9. [Online]. Available: https://doi.org/10.1109/TDC.2018.8440570

[30] Y. Shen, M. Abubakar, H. Liu, and F. Hussain, “Power quality disturbance monitoring and classification based on improved PCA and convolution neural network for windgrid distribution systems,” Energies, vol. 12, no. 7, p. 1280, Apr. 2019. [Online]. Available: https://doi.org/10.3390/en12071280

[31] L. Xu and M.-Y. Chow, “A classification approach for power distribution systems fault cause identification,” IEEE Transactions on Power Systems, vol. 21, no. 1, pp. 53–60, Feb. 2006. [Online]. Available: https://doi.org/10.1109/TPWRS.2005.861981

[32] B. Kumwenda, E. Zulu, and M. Ndiaye, “System disturbance classification model for a low voltage distribution network,” in 2024 IEEE PES/IAS PowerAfrica. IEEE, Oct. 2024, pp. 01–05. [Online]. Available: https://doi.org/10.1109/PowerAfrica61624.2024.10759455