Code Monkey home page Code Monkey logo

credit-card-fraud-detection's Introduction

Credit Card Fraud Detection Analysis and Predction Model

Dataset

This dataset is taken from Kaggle:
https://www.kaggle.com/mlg-ulb/creditcardfraud/data

We have time of transaction, 28 anonimyzed features, amount of transaction and the class of transaction in the dataset. This datset is highly skewed with Fraud transactions being only 0.17% of total transactions.

This dataset is particularly interesting since we encounter highly skewed data in many practical scenarios such as click conversion in advertizing, defect analysis in manufacturing and so on.

Conclusion

  • EDA did not show clear separation of fraud and normal transaction captured by any single parameter
  • Fraud transactions are typically small. On a crude term, transaction with values more than maximum of fraud transaction can safely be assumed as normal
  • Both Tensorflow and Keras model built on the creditcard dataset showed very high test accuracies (99.46% & 99.82%) however, failed to capture the Fraud transaction in this highly skewed data
  • Autoencoder NN model with a small threshold for reconstruction error can capture most of Fraud transaction however, it also significantly misclassify Normal transaction as Fraud.
  • t-SNE plot showed good separation between the normal and fraudalant transaction in the scatterplot suggesting prediction model to show good accuracy in model developed training and testing within the dataset.

How to improve fraud detection?

  • Undersampling of normal class data to match fraud sample size
  • Otherway round, simulate (with SMOTE technique) more fraud data
  • More fraud data is always better, particularly for NN
  • Train a larger or different Autoencoder or other NN

credit-card-fraud-detection's People

Contributors

mnpathak1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.