top of page

Credit Card Fraud Detection

Problem Statement

Financial institutions face increasing risks due to fraudulent transactions that can lead to substantial monetary losses and damaged trust. With millions of transactions occurring daily, detecting fraud manually or reactively is inefficient and often ineffective. There is a critical need for a real-time, automated system to identify suspicious financial activities based on transaction patterns.

Project Goal

To develop a machine learning-based fraud detection system capable of analyzing transaction details and predicting the likelihood of fraud in real-time. The model is integrated into an interactive web application, allowing users to simulate or evaluate transactions through a simple UI.

Key Features

  • 📈 Exploratory Data Analysis (EDA):
    • Analyzed over 6 million transactions to identify trends in fraud frequency, transaction types, and balance behavior.
    • Engineered custom features like balance differences to highlight suspicious activity.
  • 🤖 ML Pipeline with Logistic Regression:
    • Preprocessed categorical (type) and numerical features using ColumnTransformer.
    • Balanced the model for imbalanced classes using class_weight='balanced'.
    • Achieved:
      • Precision (Fraud class): ~2%
      • Recall (Fraud class): ~94%
      • F1 Score (Fraud class): ~4%
  • 💡 Model Optimization:
    • Handled highly imbalanced data with appropriate evaluation metrics.
    • Focused on minimizing false negatives to reduce undetected fraud.
  • 🖥️ Interactive Web App (Streamlit):
    • User-friendly interface where users can:
      • Enter transaction details
      • Instantly receive a fraud prediction
    • Clearly highlights fraudulent vs legitimate transactions using color-coded results.

Outcome

  • Built a robust fraud detection model capable of analyzing high-volume financial transactions.
  • Deployed as a Streamlit-based web application for ease of use and accessibility.
  • Demonstrated practical handling of class imbalance in fraud detection.
  • Delivered a system that can help institutions identify fraudulent behavior in real-time, minimizing risk exposure.

Project Gallery

bottom of page