GithubHelp home page GithubHelp logo

ajnavneet / transactionfrauddetection_isolationforest_lof Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 96.31 MB

Fraud transactional detection using Isolation Forest and Local Outlier Factor (LOF) models.

License: MIT License

Jupyter Notebook 98.43% Python 1.57%
anomaly-detection fraud-detection isolation-forest local-outlier-factor transaction

transactionfrauddetection_isolationforest_lof's Introduction

Fraudulent Transaction Detection using Isolation Forest and LOF

Business Objective

Fraudulent transactions in the banking or payment industry pose a significant challenge, resulting from illegal credit card usage without the cardholder's knowledge. Detecting fraudulent charges in real-time can help prevent financial losses and protect customer trust.


Objective

This project employs machine learning techniques to identify fraudulent transactions, specifically using unsupervised learning with Isolation Forest and Local Outlier Factor (LOF) algorithms.


Data Description

The dataset used in this project contains approximately 140,000 masked credit card transactions, each represented by 15 numerical features. These features are the result of PCA transformation, and due to confidentiality reasons, we lack specific information about the attributes.


Tech Stack

  • Language: Python
  • Libraries: scikit-learn, pandas, matplotlib, numpy, seaborn

Approach

The project follows a structured approach:

  1. Import the required libraries and packages.
  2. Open the config.ini file, a configuration file that can be edited to adapt to different datasets.
  3. Read the dataset containing masked credit card transaction data.
  4. Perform exploratory data analysis to understand the dataset.
  5. Handle missing values and preprocess the data.
  6. Determine the contamination amount for Isolation Forest.
  7. Train models using Isolation Forest and Local Outlier Factor.
  8. Make predictions and identify fraudulent transactions.

Modular Code

  • input: Contains dataset files and a config.ini configuration file.
  • src: The core of the project, with modularized code organized into the engine.py file and the ml_pipeline folder. The ml_pipeline folder contains functions in separate Python files, used within engine.py.
  • output: Contains pre-trained models saved as .pkl files for future use.
  • lib: A reference folder containing the IPython notebooks.

transactionfrauddetection_isolationforest_lof's People

Contributors

ajnavneet avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.