Financial Fraud Detection (FFD) is an end-to-end machine learning project that classifies fraudulent credit card transactions using a suite of supervised learning models. To overcome the severe class imbalance inherent in fraud datasets, the pipeline uses a Generative Adversarial Network (GAN) to synthesize realistic fraud samples before training six classifiers: Random Forest, SVM, KNN, Naive Bayes, XGBoost, and LightGBM.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Antisource/FFD/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Set up the environment and run the full pipeline in minutes.
Dataset
Understand the credit card transaction data and its features.
GAN Architecture
Learn how the generator and discriminator balance the dataset.
Model Reference
Explore each of the six fraud detection classifiers.
How It Works
The project follows a seven-step pipeline that takes raw transaction data, balances it with synthetic samples, and produces fully evaluated fraud classifiers.Load and explore the dataset
Import 50,492 credit card transactions (50,000 genuine, 492 fraudulent) with 30 PCA-anonymized features.
Preprocess the data
Remove null values, drop the
Time column, apply standard scaling to Amount, and reduce to 2D with PCA for visualization.Train the GAN
Build and train a generator and discriminator to produce synthetic fraudulent transactions, monitoring quality with PCA plots across epochs.
Train the classifiers
Combine real and synthetic fraud data, then train Random Forest, SVM, KNN, Naive Bayes, XGBoost, and LightGBM models.
Key Features
Class Imbalance Handling
GAN-generated synthetic fraud samples bring the dataset to a 1:1 ratio before training.
PCA Visualization
Dimensionality reduction projects features to 2D for exploratory plots and GAN monitoring.
Six Classifiers
Compare tree-based, kernel-based, distance-based, probabilistic, and boosted models side by side.
Evaluation Metrics
Accuracy, precision, recall, F1-score, and confusion matrices for every model.