**5. Conclusions**

In order to better adapt to the rapid development of the power grid, aiming at the unbalanced dataset on the user side and improving the e fficiency and accuracy of electricity theft detection algorithms, this paper proposed a method based on K-SMOTE and RF classifier for detecting electricity theft. The main conclusions can be summarized as below:


The method proposed in this paper can provide reliable targets for manual inspection, thereby reducing nontechnical losses in power systems and, hence, improving system reliability and security.

**Author Contributions:** Conceptualization, Z.Q.; Methodology, H.L.; Data Curation, Y.W.; Writing-Original Draft Preparation, J.Z.; Writing-Review & Editing, A.A.-S. Resources, Y.Y. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported by the National Key Research and Development Project of China [grant number 2016YFF0200105], and the National Natural Science Foundation of China [grant number 51777199].

**Conflicts of Interest:** The authors declare no conflict of interest.
