Skip to content

Bank card fraud detection using machine learning. Web application using Streamlit framework

Notifications You must be signed in to change notification settings

RaimbekovA/bank-card-fraud-detection-using-machine-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

Bank card fraud detection using machine learning

A web application for analyzing bank transactions and detecting fraud.

Main functions:

  • data set preparation,
  • use of machine learning algorithms,
  • report with graphs, tables and transaction analysis,
  • comparison of the operation and accuracy of the three algorithms,
  • manual transaction verification.

Preview

image

image

image

image

image

image

Technologies used

  1. Python v3+
  2. Pandas, numpy, matplotlib, seaborn, sklearn
  3. Streamlit

Dataset

The project uses a free set of data from free access, which includes a collection of credit card transactions, both legitimate and fraudulent. The data set serves as the basis for training and evaluating the fraud detection model. We took the data set from the website kaggle.com. This site is an online resource and community for data science, machine learning and data research specialists.

How to run

  1. Download project

  2. Open in code editor

  3. Install or update pandas, numpy, matplotlib, seaborn, sklearn via terminal.

    I use pip. Example:

    pip install -U scikit-learn
    

    See the current commands on the Internet for the query "how to install pandas/numpy/...".

  4. Install streamlit:

    pip install streamlit
    
  5. Run project:

    streamlit run main.py
    
  6. Productive work! :)

Telegram If you have any questions, you can write to me in telegram: @rmbkv_a

How to use "manual transaction verification"?

You have 3 csv files. The creditcard.csv file contains all transactions. In the other two files, transactions are divided into fraudulent and legal ones.

  1. Open any csv file
  2. Copy any line. For example: -1.1152878574425795,-19.1397328634111,9.28684735978866,-20.134992104854,7.81867331002574,-15.652207677206302,-1.66834770694329,-21.3404780994803,0.6418997011947,-8.55011032700099,-16.6496281595399,4.81815244707108,-9.44531478308794,1.3170562933234098,-7.24346097400378,0.830910291033798,-9.533257050393189,-18.750641147467398,-8.09264877340557,3.32675827497024,0.42720343146936,-2.1826919456095504,0.5205430723666421,-0.7605564151887328,0.6627666383972359,-0.948454306235033,0.12179592582979301,-3.3818429293561,-1.2565236213625801,0.20610286556509647,1
  3. Delete ",1" or ",0" in the end.
  4. Paste new line in input label and submit. For example: -1.1152878574425795,-19.1397328634111,9.28684735978866,-20.134992104854,7.81867331002574,-15.652207677206302,-1.66834770694329,-21.3404780994803,0.6418997011947,-8.55011032700099,-16.6496281595399,4.81815244707108,-9.44531478308794,1.3170562933234098,-7.24346097400378,0.830910291033798,-9.533257050393189,-18.750641147467398,-8.09264877340557,3.32675827497024,0.42720343146936,-2.1826919456095504,0.5205430723666421,-0.7605564151887328,0.6627666383972359,-0.948454306235033,0.12179592582979301,-3.3818429293561,-1.2565236213625801,0.20610286556509647 (At the end of the new line, I deleted ",1")

Additionally

This is my first serious project and the code is not optimized a bit. When you click on the checkboxes, the code runs a little bit long. I advise you to click all the checkboxes and wait a bit. Good luck with optimization!

⭐ Thank you for your star! ⭐