GithubHelp home page GithubHelp logo

mehrabkalantary / credit-card-fraud-detection Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.12 MB

Credit card transactions fraud detection using classic algorithms

Jupyter Notebook 100.00%
association-analysis auc-roc-curve correlation-analysis credit-card-fraud-detection feature-engineering fraud-detection imbalanced-learning model-selection roc-curve smote-tomek

credit-card-fraud-detection's Introduction

Credit Card Transactions Fraud Detection

Dataset on kaggle

Contents

Data Understanding

  • Features
  • Null values detection
  • Duplicated values detection

Data Cleaning For EDA

  • Column removal
  • Discretization
  • Creating new features
  • Feature extraction

Feature Engineering

  • Datetime feature extraction
  • Credit card feature extraction

Exploratory Data Analysis

  • Univariate Analysis

    • Target
    • Categorical features
    • Numerical features
  • Bivariate Analysis

    • Target analysis
    • Amount of activity analysis
    • Time analysis

Correlation and Association Analysis

  • Correlation matrix
  • Association matrix

Data Preprocessing

  • Column removal

  • Log transform

  • Categorical encoding

    • Binary encoding
    • Weight of evidence encoding
    • Ordinal encoding
  • Train-test split

Imbalanced Learning

Target is imbalanced

  • p

Methods performed

  • No changes
  • Random under sampling
  • Random over sampling
  • SMOTE-Tomek links
  • Class weights

Feature Importance

pp

Modeling

  1. Random Forest Classifier
  2. Logistic Regression Classifier
  3. Naive Bayes
  4. Decision Tree Classifier
  5. Support Vector Machine (SVM) Classifier
  6. K-nearest neighbor (KNN) Classifier

Evaluation

  • Confusion matrix
  • AUC curve
  • Classification metrics
  • Decision boundary

Results on random forest classifier for test data

  • p2

  • p3

Model Selection

Results on all models for test data all

credit-card-fraud-detection's People

Contributors

mehrabkalantary 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.