Skip to content

Making a fraud detection model for credit card using MLP Classifier

License

Notifications You must be signed in to change notification settings

Samuel-the-crack/Credit-Card-Fraud-Detction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Credit-Card-Fraud-Detction

Making a fraud detection model for credit card using neural network (MLP Classifier)

A. Background

Credit Card Fraud has been a serious crime scene for the last few years, therefore I'm curious for making a Credit Card Fraud detection model for preventive step. This model is a basic model and can be developed in the upcoming years. My Credit card fraud detection model using a PCA-ed data to protect customers personal informations. The machine learning algrithm that used here is Neural Network.

Requirements : Pandas, Numpy, Seaborn, Matplotlib, Imblearn, Sklearn

B. Overview

As I have mentioned before that in this model I'm using Neural network algorithm. In this data there are four main columns: Time, V1-V28, Ammount, and Class. Because Neural network is a supervised machine learning so I have to define the target and feature (class, V1-V28).

Because the data is to unbalanced, I decided to balanced it with oversampling method. The data's countplot after balancing turns out to be like the picture below.

The output of this model is a line plot of neural network with four different numbers of hidden layers. After normalize the data and splitting it I made a machine learning model to predict the output and it turns out to be like the picture below.

From the graph above we can conclude that the best accuracy of this model was the one with 50 hidden layers with 97.7% of accuracy.

For the complete code you can see it here