Skip to main content

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.

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.

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

Load and explore the dataset

Import 50,492 credit card transactions (50,000 genuine, 492 fraudulent) with 30 PCA-anonymized features.
2

Preprocess the data

Remove null values, drop the Time column, apply standard scaling to Amount, and reduce to 2D with PCA for visualization.
3

Train the GAN

Build and train a generator and discriminator to produce synthetic fraudulent transactions, monitoring quality with PCA plots across epochs.
4

Train the classifiers

Combine real and synthetic fraud data, then train Random Forest, SVM, KNN, Naive Bayes, XGBoost, and LightGBM models.
5

Evaluate and compare

Measure accuracy, precision, recall, and F1-score for each model using classification reports and confusion matrices.

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.

Build docs developers (and LLMs) love