{'fraction_non_alphanumeric': 0.02569882777276826, 'fraction_numerical': 0.017132551848512173, 'mean_word_length': 4.68974358974359, '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}}
Modified Focal Loss in Imbalanced XGBoost for Credit Card Fraud Detection

: The development of credit card use in Indonesia has not been matched by the security provided by credit card service providers. This resulted in significant losses both in terms of banking and customers. The difficulty in finding the characteristics of credit card fraud is one of the biggest challenges. Currently, many are developing machine learning models that can identify credit card fraud to help banks. Unfortunately, the model created is mostly biased towards the class which has more dominant data. This problem is caused by the imbalance of the data on the available dataset. In the previous research, Wang et al found the implementation of Focal loss in XGBoost improve the precision, recall of imbalanced data. However according to Qin et al, the parameter loss from Focal loss have poor judgement in several case of imbalanced data and to handle this weakness, they proposed Weighted – Cross Entropy Loss (W-CEL) loss in Focal loss. According to previous research, we propose a Modified Focal Loss method for Imbalanced XGBoost by entering another parameter from W-CEL loss to Focal Loss to improve the ability of Focal Loss. Focal loss itself is a method that is often used to give weight to classes that are often misinterpreted, so that with the use of imbalance parameters ( 𝜑 ) from W-CEL loss is expected to improve the weighted value of the Focal Loss. We tested our proposed method in credit card fraud dataset from Université Libre de Bruxelles (ULB) machine learning group. Our proposed method produced 100 % accuracy, 0.97 precision, 0.56 recall and 0.72 MCC score in scenario 1 with extreme imbalanced data, in scenario 2 with the mild imbalanced data, the result delivered 99% accuracy, 0.88 precision, 0.87 recall and 0.89 MCC and in scenario 3 with the medium imbalance data, the result delivered 100% accuracy, 0.97 precision score, 0.72 recall score and 0.83 MCC score. The results obtained in this study proved that the proposed method makes machine learning models valid and unbiased, especially in mild-imbalanced data. However, many improvements still need to be made to medium and extreme imbalanced data.