Skip to content

prernanookala/Credit-Card-Fraud-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏦 Credit Card Fraud Detection

πŸ“Œ Overview

This project focuses on detecting fraudulent credit card transactions using machine learning techniques. Given the extreme imbalance in fraud transactions, methods like SMOTE (Synthetic Minority Over-Sampling Technique) and Logistic Regression have been employed to enhance model performance.

πŸ“‚ Dataset Description

The dataset consists of credit card transactions over a two-day period in September 2013, containing:

  • 284,807 transactions
  • 492 fraud cases (0.172% of total transactions)

πŸ”‘ Features:

  • V1 to V28: PCA-transformed features (due to confidentiality).
  • Time: Elapsed time since the first transaction.
  • Amount: Transaction amount.
  • Class: Fraud status (0 = Non-fraud, 1 = Fraud).

πŸ› οΈ Preprocessing Techniques

βš–οΈ Handling Class Imbalance:

  • Since fraudulent transactions are extremely rare (0.17%), we applied SMOTE to balance the dataset.
  • Fraudulent instances increased from 469 to 65,598 post-balancing.

πŸ—οΈ Feature Engineering:

  • Weight of Evidence (WOE): Used to transform categorical variables into continuous values.
  • Information Value (IV): Selected the most predictive features (IV > 0.3).

πŸ“Š Exploratory Data Analysis

  • πŸ“ˆ Correlation heatmaps to identify relationships between features.
  • πŸ“‰ Distribution analysis to understand fraud vs. non-fraud transactions.
  • πŸ›‘ Fraud vs. Non-Fraud Imbalance visualization.

πŸ€– Machine Learning Model

The primary model used is Logistic Regression, a widely accepted model for fraud detection.

πŸ” Model Evaluation:

  • ROC Curve πŸ“ˆ: Visualizing classification performance.
  • Fraud Score Calculation 🎯: Transformed log-odds into a fraud risk score (0-100), categorizing transactions as:
    • 🟒 No Risk
    • 🟑 Low Risk
    • 🟠 Moderate Risk
    • πŸ”΄ High Risk

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published