research

All research

Fraud detection

Improving Fraud Detection Accuracy Through Advanced Feature Engineering and Comparative Model Evaluation

Type
Bachelor's thesis
Date
June 2025
University
Royal University of Phnom Penh
Length
42 pages

Read it

Prefer the files? Download the PDF (2.4 MB) or the notebook (1.7 MB).

Two bar charts by hour of day. Above, the percentage of transactions that are fraudulent, highest between 3 and 6 in the morning. Below, the number of fraudulent transactions, roughly the same every hour.
From the notebook: how much of each hour's traffic is fraud. The thesis turns this into its hour_risk_level feature.

Abstract

Financial fraud detection is a critical and challenging task, especially in the context of large-scale transaction datasets that exhibit high class imbalance and complex behavioral patterns. In this study, we propose a comprehensive machine learning pipeline designed to enhance fraud detection accuracy by integrating advanced feature engineering, outlier analysis, and comparative model evaluation. We begin by transforming raw transactional data into informative features, such as account balance behavior (emptied_account), temporal transaction indicators (hour_risk_level), and custom behavioral flags (e.g., matching amount and balance). These engineered features are supplemented with outlier indicator variables that capture extreme financial anomalies, enabling the model to retain important variance while mitigating noise through winsorization.

To evaluate the effectiveness of our feature-enriched dataset, we train and compare several state-of-the-art classification models: CatBoost, XGBoost, LightGBM, Random Forest, K-Nearest Neighbors (KNN), and Logistic Regression. All models are evaluated using a balanced set of performance metrics including accuracy, precision, recall, F1-score, and the Area Under the Receiver Operating Characteristic Curve (ROC-AUC). Additionally, we address the issue of class imbalance by applying cost-sensitive learning through class weighting, particularly in boosting models like CatBoost. The performance is further scrutinized through overfitting analysis, using both training and test metrics to quantify generalization.

Our experiments show that gradient boosting models, particularly CatBoost, consistently outperform traditional models in detecting fraudulent transactions, thanks to their ability to handle categorical variables, class imbalance, and complex feature interactions effectively. The study emphasizes the critical role of domain-specific feature engineering and cost-aware learning strategies in developing robust fraud detection systems. These findings provide a scalable and interpretable framework for financial institutions seeking to enhance their fraud prevention capabilities in real time.

In the thesis

In the notebook

Cite it

The DOI is the Zenodo record's: 10.5281/zenodo.15618190.

Panhathun, D. (2025). Improving Online Payment Fraud Detection with Feature Engineering and Cost-Sensitive Machine Learning [Thesis, Royal University of Phnom Penh]. Zenodo. https://doi.org/10.5281/zenodo.15618190

@thesis{panhathun2025fraud,
  author      = {Panhathun, Duch},
  title       = {Improving Online Payment Fraud Detection with Feature Engineering and Cost-Sensitive Machine Learning},
  type        = {Bachelor's thesis},
  institution = {Royal University of Phnom Penh},
  year        = {2025},
  doi         = {10.5281/zenodo.15618190},
  url         = {https://doi.org/10.5281/zenodo.15618190}
}

Files and links

  • research_paper.pdf, the thesis, 2.4 MB, opens in your browser's PDF viewer
    SHA-256b8b3df65ce315ad24a26b8bf04a04643895ce29b20635c4a28ec42dbeb703f35
  • online-payment-fraud-detection-v7.ipynb, the notebook, 1.7 MB
    SHA-2560882c3bd15f21b7b574bea96d0c47ac163a8d8f5ffbe813f59328f7ab70858c1
  • Zenodo record, 8 June 2025, CC BY 4.0
  • The dataset on Kaggle. 6,362,620 transactions with 11 features each, from Kaggle. It is not hosted here: the notebook expects you to download it.

Which version is this?

This PDF is the thesis as bound: its cover is dated June 2025 and the file was produced on 30 June 2025. The Zenodo record was published on 8 June 2025 and holds the Word manuscript, under a different title. The two differ in their wording in places, so cite the version you read. The DOI resolves to the Zenodo record.

Good to know

  • Both viewers work without JavaScript. The thesis is shown as page images, and there is a text version for searching and for screen readers.
  • The notebook is shown as it was saved: cells in file order, with the output stored in the file. The numbers beside the cells are the saved execution counts, so they are not always in sequence.
  • Nothing is re-run here. The numbers you see are the ones the notebook saved.