/AiML-financial-fraud-detection-model

The Fraud Detection project aims to improve identification of fraudulent activities in e-commerce and banking by developing advanced machine learning models that analyze transaction data, employ feature engineering, and implement real-time monitoring for high accuracy fraud detection.

Primary LanguageJupyter NotebookMIT LicenseMIT

Machine Learning-based Fraud Detection for E-commerce and Banking Transactions

The Fraud Detection project for E-commerce and Banking Transactions aims to significantly improve the identification of fraudulent activities within these sectors. It focuses on developing advanced machine learning models that analyze transaction data, employ sophisticated feature engineering techniques, and implement real-time monitoring systems to achieve high accuracy in fraud detection.

Table of Contents

  1. Exploratory Data Analysis (EDA)
  2. Model Building and Training
  3. Model Explainability Using SHAP
  4. Model Deployment and API Development
  5. Contributing
  6. License

1. Exploratory Data Analysis (EDA)

Univariate Analysis

featureEng

Bivariate Analysis

Feature Engineering

featureEng

2. Model Building and Training

After training and testing six models (three for each dataset), we selected the following models:

2.1 Fraud-IP Dataset - XGBoost Model

xgboost xgboost2

2.2 Credit Card Dataset - Logistic Regression with StandardScaler

lr1 lr2

3. Model Explainability Using SHAP

Summary Plot

summary plot

Force Plot

forceplot

4. Model Deployment and API Development

Running the Flask App

runflask

Testing the API

testflask

Building Docker Image

build

Running Docker Container

runflask

Testing the API from Postman

Generated 3 new instances and sent a request to the fraud detection model api.

postman

Contributing

Contributions are welcome! Please fork the repository and submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.