Credit Card Fraud Detection Machine Learning
- Priank Ravichandar
- Sep 9, 2024
- 1 min read
Detecting potential credit card fraud by deploying machine learning algorithms to analyze transaction data.

Summary of Machine Learning
Dataset
The data was downloaded from Kaggle:https://www.kaggle.com/mlg-ulb/creditcardfraud
The dataset contains transactions made by European credit cardholders credit cards in September 2013. This dataset presents transactions that occurred in two days, where we have 492 frauds out of 284,807 transactions. The dataset is highly unbalanced, the positive class (frauds) accounts for 0.172% of all transactions.
The dataset has been collected and analyzed during a research collaboration between Worldline and the Machine Learning Group (http://mlg.ulb.ac.be) of ULB (Université Libre de Bruxelles) on big data mining and fraud detection.
Goal
The objective is to classify the data transactions as either legitimate (class 0) or fraudulent (class 1) using a machine learning model. Four machine learning models will be trained and tested to determine which will yield the best results:
Decision Trees
Random Forest
K Nearest Neighbours
K Means Clustering
Tools
Python, K Nearest Neighbours (KNN), K Means Clustering, Decision Tree, Random Forest
Insights
Overall, the Random Forests Model does the best job of predicting fraudulent credit card transactions.