GithubHelp home page GithubHelp logo

creditcard-fraud-detection's Introduction

Credit Card Fraud Detection

Overview

This project focuses on building and evaluating machine learning models for credit card fraud detection. The dataset used contains transactions labeled as fraudulent or non-fraudulent.

Files

  • ML.py: Python script containing the machine learning code.
  • creditcard.csv: Dataset file containing transaction data.

Libraries Used

  • numpy
  • pandas
  • matplotlib
  • seaborn
  • warnings
  • sklearn (various modules for models, preprocessing, and metrics)
  • imbalanced-learn (for oversampling)
  • xgboost (if used, based on the conversation)
  • streamlit for model deployment

Usage

  1. Create a Virtual env to run ML.py.
  2. Install the required libraries using pip install -r requirements.txt.
  3. Ensure the dataset file (creditcard.csv) is in the same directory.
  4. Run the ML.py script to train and evaluate machine learning models.

Machine Learning Models

The following machine learning models were implemented and evaluated:

  • Logistic Regression
  • Decision Tree
  • Random Forest
  • AdaBoost
  • Gradient Boosting
  • Linear Support Vector Machine (SVM)
  • Support Vector Machine with Polynomial kernel and rbf kernel.

Results

Evaluation metrics such as precision, recall, F1-score, and accuracy were computed for each model. Model performance varies, and it's crucial to consider business requirements when choosing the best model.

Future Improvements

  • Hyperparameter tuning for models.
  • Feature engineering to enhance model performance.
  • Exploration of other algorithms and ensemble methods.

Notes

  • The dataset is imbalanced, impacting model performance.
  • Consider the trade-off between precision and recall based on business needs.
  • Experiment with different approaches to handle class imbalance.

creditcard-fraud-detection's People

Contributors

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