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.

The FFD project is built on a publicly available credit card transaction dataset hosted on Kaggle. It contains 50,492 real-world transactions made by European cardholders, each labelled as either genuine or fraudulent. The dataset is widely used in the machine learning community as a benchmark for fraud detection, and it presents a classic extreme class imbalance challenge that the FFD pipeline directly addresses through GAN-based data synthesis.

Dataset Structure

The dataset has 50,492 rows and 31 columns. Each row represents one transaction, and the columns are as follows:
ColumnTypeDescription
TimeFloatSeconds elapsed between this transaction and the first transaction in the dataset
V1V28FloatPCA-transformed anonymized features (original names are confidential)
AmountFloatTransaction amount in euros
ClassIntegerTarget label: 0 = genuine transaction, 1 = fraudulent transaction

Shape

data.shape
# (50492, 31)

Class Distribution

data.Class.value_counts()
# 0    50000
# 1      492
# Name: Class, dtype: int64
The 28 PCA-transformed features (V1V28) are the result of a dimensionality reduction applied to the original transaction attributes, which remain confidential for privacy reasons. Only Time and Amount retain their original, interpretable values.

Loading the Dataset

import pandas as pd

data = pd.read_csv('Creditcard_dataset.csv')

Class Imbalance at a Glance

The dataset contains 50,000 genuine transactions (Class = 0) and only 492 fraudulent transactions (Class = 1), making fraud just ~0.975% of all records. This severe imbalance means a naive model can achieve over 99% accuracy by simply predicting every transaction as genuine — while completely failing to detect any actual fraud.

Genuine Transactions

50,000 labelled Class = 0

Fraudulent Transactions

492 labelled Class = 1
The FFD pipeline resolves this imbalance by training a Generative Adversarial Network (GAN) to synthesize 492 additional realistic fraud samples, bringing the training ratio closer to 1:1. See Class Imbalance for the full explanation.

Accessing the Dataset

1

Download from Kaggle

Visit the Credit Card Fraud Detection dataset page on Kaggle and download creditcard.csv. A free Kaggle account is required.
2

Rename and place in the repo root

Rename the downloaded file to Creditcard_dataset.csv and place it in the root of the cloned FFD repository alongside Design_Project.ipynb.
3

Verify the load

Open the notebook and run the data-loading cell to confirm data.shape returns (50492, 31).

Build docs developers (and LLMs) love