January 28, 2026
Machine learning in the prediction of reimbursements for electrical damages
Benjamim Abreu de Souza; Wilson Tarantin Junior
Summary prepared by the ResumeAI tool, an artificial intelligence solution developed by Instituto Pecege focused on synthesis and writing.
The supply of electrical energy, an essential service, is subject to interruptions that generate complaints and requests for compensation for electrical damage, often associated with environmental factors (ANEEL, 2024). This study employs machine learning techniques to model and predict the occurrence of these requests in municipalities of a utility company in Southeast Brazil. The research adopts an exploratory approach, combining quantitative and qualitative data from public sources, including meteorological, socioeconomic, and energy distribution technical information (Cipoli, Nogueira e Rios, 2003). The modeling was performed in the Spyder environment, using the Python language and libraries such as Sklearn and Statsmodels (Fávero e Belfiore, 2024). The hierarchical structure of the data was considered at two levels: municipalities within climatologically homogeneous regions (INCAPER, 2025).
The methodology involved collecting data from various sources. The first, named indgercomercial, accessed the Management Indicators of Distribution (INDGER) from ANEEL via API, covering the period from 2023 to 2024. The collected variables included the municipality’s IBGE code, the number of active consumer units, and the number of damage compensation requests (ANEEL, 2025). The second collection, interrupcoesaneel, also used Python code to access data on interruptions per energy distribution substation, also between 2023 and 2024. The information obtained detailed the substation, the interruption order number, the start and end dates, and the generating event (ANEEL, 2024). A third database, dados_climaticos, was obtained from the National Institute of Meteorology (INMET), containing meteorological information from 12 stations in Espírito Santo, organized by month and year (INMET, 2025). Additionally, the study incorporated the Socioeconomic Index (INSE) of the municipalities, made available by the state government (INEP, 2023).
To model the compensation requests, supervised machine learning techniques were applied: Multilevel regression modeling, count data regression model, and Random Forest (Géron, 2019). Multilevel modeling, suitable for data with a nested structure, allowed for the analysis of individual and between-group variations (Fávero e Belfiore, 2024). The count data regression model used the Negative Binomial distribution, appropriate for non-negative integers with overdispersion (Cameron e Trivedi, 1990). The Random Forest algorithm, in turn, aggregated a set of decision tree predictors (Géron, 2019). Cross-validation of the models used 5 folds and the R² coefficient of determination as a performance metric.
The results revealed that the Multilevel model outperformed the Negative Binomial and Random Forest models, although all provided relevant contributions. Municipal characteristics, such as the number of consumer units and the socioeconomic index, proved to be statistically significant in at least one of the models, as did the average wind speed, a parameter of climatologically homogeneous regions. Exploratory data analysis identified a high correlation between predictor variables such as consumer units, interruptions, wind speed, gusts, humidity, pressure, and temperature (Vasconcellos e Alves, 2000). Multilevel modeling found heterogeneity in compensation requests among regions, with the intercept variance referring to the regions being significantly different from zero. The final model, after Box Cox transformation, showed statistical significance for the variables units, wind speed, and wind gusts. The Negative Binomial model also considered the INSE variable as statistically significant. The Random Forest model, in turn, indicated the importance of electrical energy interruptions, although without statistical significance in the other models.
The joint analysis of the models indicated that the variables with statistical significance in the Multilevel and Negative Binomial models have the potential to influence compensation requests. The number of consumer units with active contracts in the municipality emerged as the most important variable, followed by wind speed and gusts, and the socioeconomic index of the municipalities. The application of different modeling techniques combined with public data proved sufficient to investigate the factors influencing requests for compensation for electrical damage. It is concluded that the objective was achieved: it was identified that the number of consumer units, wind speed, and socioeconomic index are determining factors for the occurrence of requests for compensation for electrical damage, with the Multilevel model presenting the best predictive performance.
Bibliographic References:
Agência Nacional de Energia Elétrica [ANEEL]. 2021a. Módulo 9 do PRODIST: Procedimentos de Distribuição de Energia Elétrica no Sistema Elétrico Nacional. Disponível em: <https://www2.aneel.gov.br/cedoc/aren202195628.pdf>. Acesso em: 16 mar. 2025.
Agência Nacional de Energia Elétrica [ANEEL]. 2021b. Resolução Normativa nº 1000, de 2021. Diário Oficial da União, Brasília, 23 dez. 2021. Disponível em: <https://www2.aneel.gov.br/cedoc/ren20211000.html>. Acesso em: 16 mar. 2025.
Agência Nacional de Energia Elétrica [ANEEL]. 2024. Qualidade do Fornecimento de Energia Elétrica. Disponível em: <https://www.gov.br/aneel/pt-br/assuntos/distribuicao/qualidade-do-fornecimento-de-energia-eletrica>. Acesso em: 16 mar. 2025.
Agência Nacional de Energia Elétrica [ANEEL]. 2025. Indicadores Gerenciais da Distribuição. Disponível em: <https://dadosabertos.aneel.gov.br/dataset/indger-indicadores-gerenciais-da-distribuicao>. Acesso em: 16 mar. 2025.
Brasil. Instituto Nacional de Estudos e Pesquisas Educacionais Anísio Teixeira [INEP]. 2023. Saeb 2021: Indicador de Nível Socioeconômico do Saeb 2021: nota técnica. Inep, Brasília, DF, Brasil.
Cameron, A. C.; Trivedi, P. K. 1990. Regression-based test for over dispersion in the Poisson model.Journal of Econometrics, v.46, n. 3, p. 347 – 364.
Cipoli, J.A.; Nogueira, E.D.B.; Rios, A.J.S. 2003. Ressarcimento de Danos Elétricos. Disponível em: <http://www.mfap.com.br/pesquisa/arquivos/20090428131506-Ressarcimento%20de%20Danos%20Eletricos.pdf>. Acesso em: 28 fev. 2025.
Fávero, L.; Belfiore, P. 2024. Manual de análise de dados: estatística e machine learning com Excel, SPSS, Stata, R e Python. 2ed. LTC, Rio de Janeiro, RJ, Brasil.
Géron, A. 2019. Mãos à obra: aprendizado de máquina com Scikit-Learn e TensorFlow. Alta Books, Rio de Janeiro, RJ, Brasil.
Instituto Capixaba de Pesquisa, Assistência Técnica e Extensão Rural [INCAPER]. 2025. Legenda de Regiões Meteorológicas. Disponível em: <https://meteorologia.incaper.es.gov.br/legenda_regioes>. Acesso em: 25 set. 2025.
Instituto Nacional de Meteorologia [INMET]. 2025. Glossário. Disponível em: <https://portal.inmet.gov.br/glossario/glossario>. Acesso em: 29 set. 2025.
Vasconcellos, M.; Alves, D. 2000. Manual de econometria. Atlas, São Paulo, Brasil.
Executive summary from the Final Project of the Specialization in Data Science and Analytics from the MBA USP/Esalq
Learn more about the course; click here: