Skip to content

anthonyckleung/Autoencoders-Credit-Card-Fraud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Credit card fraud detection with Autoencoders

Task: Demonstrate the use of autoencoders to train a highly imbalance and high-dimensional data set of credit card records

This demonstration is done on a jupyter notebook.

Prerequisites:

  • Python 3
  • Jupyter notebook
  • Keras (TensorFlow backend)
  • sklearn
  • numpy, seaborn, pandas
  • data source: Kaggle

Description

This notebook demonstrates the use of autoencoders as part of a semi-supervised approach to model a highly imbalance and high-dimensional data set.

Here is a tSNE plot of the original dataset:

alt text

Obviously, the two target class are highly inseparable at its originally state.

Now, we train an autoencoder with this data and extract the latent features of this dataset from the network. By plotting the latent features with tSNE again we get the following:

alt text

We see that it is much easier to separate the 2 target classes using the latent features than the original ones. It is so well separated that one a simple logistic regression can yield very accurate predictions (over 90%)! Check out the notebook credit-card-fraud-classifier.ipynb for details.

Releases

No releases published

Packages

No packages published