{'fraction_non_alphanumeric': 0.027698863636363636, 'fraction_numerical': 0.002840909090909091, 'mean_word_length': 5.073275862068965, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, '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}}
An Effective Undersampling Approach to Deal with Class Imbalance Problem in Software Defect Prediction

Machine learning based software defect prediction (SDP) approaches assist in estimating where faults are likely to occur in source code. In real-life projects, fault-free modules are higher in number than faulty modules. This is referred to as class imbalance problem. Random over-sampling and random under-sampling (RUS) are the basic sampling strategies in data-level approaches for class imbalance problem. The RUS approach removes the instances randomly and due to randomness, loss of useful information may occur. On the other hand, over-sampling may lead to biased modeling. In this paper, we propose a new technique known as Structured Under-Sampling (SUS) to address both of these problems. The proposed approach systematically removes inconsistent and redundant instances. After that, most similar instances to the existing instances are removed to ensure minimum loss of information. For empirical evaluation, C4.5 classifier has been used to compare SUS with RUS and Tomek RUS while performance difference has been analyzed using F1-score and ROC. The results of our investigation show improved performance of SUS over other approaches. Moreover, it has been observed that the Imbalance ratio (IR) affects the performance of SUS. More specifically, when IR > 5 SUS outperformed in all results.