{'fraction_non_alphanumeric': 0.014341590612777053, 'fraction_numerical': 0.003911342894393742, 'mean_word_length': 5.703056768558952, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Improved practices in machine learning algorithms for NTL detection with imbalanced data

Non-technical losses (NTLs) in electrical power grids, which mainly concern electrical theft, can have a major impact on the economies of energy providers and nations. The use of machine learning algorithms to detect NTLs has been widely studied to attenuate the costs of on-site inspections of electricity consumers showing suspicious consumption behavior. An issue that has not received enough attention in the research is the imbalance between fraudulent and non-fraudulent data, which can have a major negative impact on the performance of supervised learning methods. Furthermore, most methods proposed in the literature have not evaluated the effectiveness of their methodology using meaningful performance measures. We propose a framework that addresses the problem of data imbalance in supervised classification techniques for NTL detection through resampling techniques. Additionally, we present the results of our experimental evaluation using an extensive list of performance metrics, two of which have not been previously reported in the literature — the Matthews Correlation Coefficient and the Fβ-score. Experiments have been carried out using 22 months of electricity consumption data corresponding to over 3,400 industrial and commercial customers in Honduras. Our experimental results show that class imbalance strategies applied on supervised classifiers for NTL detection can significantly improve the quality of predictions.