/Sampling-Methods

Credit card fraud detection using various sampling methods and machine learning algorithms.

Primary LanguageJupyter Notebook

Credit Card Fraud Detection Project

Overview

This project focuses on credit card fraud detection using various sampling methods and machine learning algorithms. Different sampling methods such as simple random sampling, systematic sampling, stratified sampling, cluster sampling, and bootstrap sampling were applied to a credit card transaction dataset. Machine learning algorithms including KMeans, Decision Tree, Random Forest, XGBoost, and LightGBM were then trained on the sampled datasets to predict fraudulent transactions.

Sampling Methods

The following sampling methods were applied to the dataset:

  1. Simple Random Sampling: Randomly selecting data points without any specific criteria.
  2. Systematic Sampling: Selecting every nth data point from the dataset.
  3. Stratified Sampling: Dividing the dataset into homogeneous groups (strata) based on a specific feature and then sampling from each stratum.
  4. Cluster Sampling: Dividing the dataset into clusters and then randomly selecting entire clusters for sampling.
  5. Bootstrap Sampling: Sampling with replacement, allowing some data points to be selected multiple times.

Machine Learning Algorithms

The following machine learning algorithms were trained on the sampled datasets:

  1. KMeans Classifier
  2. Decision Tree Classifier
  3. Random Forest Classifier
  4. XGBoost (Extreme Gradient Boosting) Classifier
  5. LightGBM (Light Gradient Boosting Machine) Classifier

Results

Accuracy scores for each combination of sampling method and machine learning algorithm were recorded and stored in tabular form. Random Forest Classifier gave the best accuracy score for each model.

image