DETEKSI PENIPUAN TRANSAKSI PADA PLATFORM MARKETPLACE MENGGUNAKAN ALGORITMA ISOLATION FOREST

Authors

  • Rakha Aryagunawibawa Universitas Jenderal Achmad Yani
  • Puspita Nurul Sabrina Universitas Jenderal Achmad Yani
  • Herdi Ashaury Universitas Jenderal Achmad Yani

DOI:

https://doi.org/10.61722/jssr.v4i5.12743

Keywords:

Fraud Detection, Marketplace, Isolation Forest, Anomaly Detection, Local Outlier Factor, Imbalanced Dataset

Abstract

The increasing use of marketplace platforms has raised the risk of transaction fraud. Fraud detection is challenging because fraudulent transactions are far less frequent than legitimate transactions, creating an imbalanced dataset. This study analyzes the capability of Isolation Forest for fraud detection, evaluates the influence of preprocessing and hyperparameter settings, and compares its performance with Local Outlier Factor (LOF). The experiment uses the public Fraudulent E-Commerce Transactions dataset from Kaggle containing 1,048,575 transactions: 996,055 legitimate transactions (94.99%) and 52,520 fraudulent transactions (5.01%). The workflow includes data cleaning, feature selection, feature engineering, One-Hot Encoding, StandardScaler, an 80:20 stratified train-test split, baseline modeling, hyperparameter tuning, threshold tuning, evaluation, and comparison with LOF. Isolation Forest is trained in an unsupervised manner, while the Is Fraudulent label is used only as evaluation ground truth. The final configuration uses contamination 0.05, 250 estimators, max_samples 0.80, threshold 0.45, and random_state 42. The model achieves Accuracy 0.9820, Precision 0.8201, Recall 0.8200, F1-Score 0.8200, ROC-AUC 0.9187, and PR-AUC 0.6458. The confusion matrix contains 197,321 True Negatives, 8,613 True Positives, 1,890 False Positives, and 1,891 False Negatives. Isolation Forest outperforms LOF on most metrics, although LOF provides slightly higher Recall. The detection result is intended as an early indicator for transactions requiring further review.

References

M. Sánchez-Paniagua, E. Fidalgo, E. Alegre, and F. Jáñez-Martino, “Fraud detection in e-commerce: a comparative analysis of features to enhance machine learning models,” Electronic Commerce Research, vol. 26, no. 2, pp. 2467–2502, Apr. 2026, doi: 10.1007/s10660-025-10029-9.

S. R. Byrapu Reddy, P. Kanagala, P. Ravichandran, D. R. Pulimamidi, P. V. Sivarambabu, and N. S. A. Polireddi, “Effective fraud detection in e-commerce: Leveraging machine learning and big data analytics,” Measurement: Sensors, vol. 33, Jun. 2024, doi: 10.1016/j.measen.2024.101138.

L. Hernandez Aros, L. X. Bustamante Molano, F. Gutierrez-Portela, J. J. Moreno Hernandez, and M. S. Rodríguez Barrero, “Financial fraud detection through the application of machine learning techniques: a literature review,” Springer Nature, Dec. 2024, doi: 10.1057/s41599-024-03606-0.

S. Renjith, “Detection of Fraudulent Sellers in Online Marketplaces using Support Vector Machine Approach,” International Journal of Engineering Trends and Technology (IJETT), vol. 57, no. 1, pp. 48–53, Mar. 2018.

S. Gavrylenko and O. Abdullin, “Improving the Accuracy of Machine Learning Model for Fraud Transactions with Combined Methods for Transaction Analysis,” Innovative Technologies and Scientific Solutions for Industries, vol. 2024, no. 4, pp. 31–38, Dec. 2024, doi: 10.30837/2522-9818.2024.4.031.

Y. F. Zhang, H. L. Lu, H. F. Lin, X. C. Qiao, and H. Zheng, “The Optimized Anomaly Detection Models Based on an Approach of Dealing with Imbalanced Dataset for Credit Card Fraud Detection,” Mobile Information Systems, vol. 2022, 2022, doi: 10.1155/2022/8027903.

I. Waspada, N. Bahtiar, P. W. Wirawan, B. Dwi, and A. Awan, “Performance Analysis of Isolation Forest Algorithm in Fraud Detection of Credit Card Transactions,” 2020.

F. Leveni, G. Weigert Cassales, B. Pfahringer, A. Bifet, and G. Boracchi, “Online Isolation Forest,” in Proceedings of the 41st International Conference on Machine Learning, vol. 235, pp. 27288–27298, 2024.

S. Ounacer, H. Ait, E. Bour, Y. Oubrahim, M. Y. Ghoumari, and M. Azzouazi, “Using Isolation Forest in anomaly detection: the case of credit card transactions,” vol. 6, no. 2, pp. 394–400, 2018.

Y. F. Zhang, H. L. Lu, H. F. Lin, X. C. Qiao, and H. Zheng, “The Optimized Anomaly Detection Models Based on an Approach of Dealing with Imbalanced Dataset for Credit Card Fraud Detection,” Mobile Information Systems, vol. 2022, 2022, doi: 10.1155/2022/8027903.

I. Waspada, N. Bahtiar, P. W. Wirawan, B. Dwi, and A. Awan, “Performance Analysis of Isolation Forest Algorithm in Fraud Detection of Credit Card Transactions,” 2020.

R. S. Ismanda, M. T. A. Silitonga, and S. Nur Hasanah, “Deteksi Hybrid Anomali Transaksi Digital dengan Optimasi Isolation Forest-K-Means untuk Peningkatan Keamanan Finansial,” Innovative: Journal of Social Science Research, vol. 5, no. 3, pp. 5749–5765, 2025, doi: 10.31004/innovative.v5i3.19791.

U. Porwal and S. Mukund, “Credit Card Fraud Detection in e-Commerce: An Outlier Detection Approach,” International Journal of Computer Sciences and Engineering, May 2019.

H. John and S. Naaz, “Credit Card Fraud Detection using Local Outlier Factor and Isolation Forest,” International Journal of Computer Sciences and Engineering, vol. 7, no. 4, pp. 1060–1064, Apr. 2019, doi: 10.26438/ijcse/v7i4.10601064.

A. Alsarhan, F. Hussein, S. Moh, and F. S. El-Salhi, “The Effect of Preprocessing Techniques, Applied to Numeric Features, on Classification Algorithms’ Performance,” 2021, doi: 10.3390/data.

A. Alsarhan, F. Hussein, S. Moh, and F. S. El-Salhi, “The Effect of Preprocessing Techniques, Applied to Numeric Features, on Classification Algorithms’ Performance,” Data (Basel), 2021, doi: 10.3390/data.

F. Pedregosa et al., “Scikit-learn: Machine Learning in Python,” Journal of Machine Learning Research, vol. 12, pp. 2825–2830, 2011.

L. Becker, “Anomaly Detection in E-Commerce Platforms via Graph Neural Networks,” Asia Pacific Economic and Management Review, vol. 2, no. 2, Mar. 2025, doi: 10.62177/apemr.v2i2.208.

S. Ounacer, H. Ait, E. Bour, Y. Oubrahim, M. Y. Ghoumari, and M. Azzouazi, “Using Isolation Forest in anomaly detection: the case of credit card transactions,” J. Big Data, vol. 6, no. 2, pp. 394–400, 2018.

N. Goix, “How to Evaluate the Quality of Unsupervised Anomaly Detection Algorithms?,” Jul. 2016.

D. Chicco and G. Jurman, “The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation,” BMC Genomics, vol. 21, no. 1, Jan. 2020, doi: 10.1186/s12864-019-6413-7.

D. W. Hosmer Jr., S. Lemeshow, and R. X. Sturdivant, Applied Logistic Regression, 3rd ed. Hoboken, NJ, USA: John Wiley & Sons, 2013, doi: 10.1002/9781118548387.

T. Saito and M. Rehmsmeier, “The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets,” PLoS One, vol. 10, no. 3, Mar. 2015, doi: 10.1371/journal.pone.0118432.

Y. F. Zhang, H. L. Lu, H. F. Lin, X. C. Qiao, and H. Zheng, “The Optimized Anomaly Detection Models Based on an Approach of Dealing with Imbalanced Dataset for Credit Card Fraud Detection,” Mobile Information Systems, vol. 2022, 2022, doi: 10.1155/2022/8027903.

S. Gavrylenko and O. Abdullin, “Improving the Accuracy of Machine Learning Model for Fraud Transactions with Combined Methods for Transaction Analysis,” Innovative Technologies and Scientific Solutions for Industries, vol. 2024, no. 4, pp. 31–38, Dec. 2024, doi: 10.30837/2522-9818.2024.4.031.

F. T. Liu, K. M. Ting, and Z.-H. Zhou, “Isolation Forest,” in Proc. 8th IEEE Int. Conf. Data Mining (ICDM), 2008, pp. 413–422, doi: 10.1109/ICDM.2008.17.

Downloads

Published

2026-09-19