Skip to content

Dhana-karthik/Fraud-detection-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Fraud-detection-analysis

Summary :

This repository discusses fraud detection analysis used to predict fake transactions made to retail shops, utilizing their transaction history details. It finds out which combination of sampling and machine learning model is best for fraud detection by comparing their quality by PR curve comparision.

Code:

Link: fraud transaction analysis

Project outcome:

  1. I have increased the accuracy of the genuine transaction by 47% after sorting out the best model and data pre-processing.

  2. Analyzed, cleaned, and pre-processed for 41989 records of datasets, assessed using various combinations of samplings and machine learning models.

  3. Instead of using a single model used 3 unique models and sampling methods created 9 combinations to select the best combo.

Steps followed:

  1. Import libraries, keep the dataset prepared, ready for analysis, filter important variables, and well-structured by running them in MS Excel.

  2. Started with data cleaning, instead of removing incomplete records replaced them with the median of the column to bring more accurate insights.

  3. Data pre-processing, need to convert categorical data into, numerical data for convenience, converted 5 categorical variables.

  4. Implementing sampling to support the least count data, in the project made use of over-sampling, under-sampling, and SMOTE sampling.

  5. With 3 different samples are processed to find fake transactions using 3 models to get 9 predictions.

  6. Used PR curve to find each model's behavior precision, recall, and f1 score are compared for each model.

Outcomes:

Confusion Matrices of random forest model:

image image image

Confusion Matrices for logistic regression:

image image image

Confusion Matrices for K-means:

image image image

PR curves of all models :

image image image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages