Giter VIP home page Giter VIP logo

damiantellez / fraud_detection Goto Github PK

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

I used a public database in order to create a logistic regression model for detecting suspicious credit card activities.

Jupyter Notebook 98.86% Python 1.14%
data-science database easy-to-learn easy-to-understand fraud-detection machine-learning machine-learning-algorithms model model-checking model-deployment model-training public-dataset scikit-learn clean-code finance financial-analysis logistic-regression confusion-matrix

fraud_detection's Introduction

Fraud Detection

thumbnail

A machine learning model to detect suspicious credit card activities, which is a frequent issue companies have to deal with.

Database

To address this problem, I used a public data set. The source was kept unrevealed due to privacy policies.

You can find the data in a csv file attached to this repository in the database folder. If it was helpful to you, you could give it a โญ

Model

Logistic Regression

This type of statistical model is used for classification and predictive analysis. Estimate the probability of a binary-outcome event occurring given a dataset of independent variables.

For this study case, I used the following independent variables:

  • distance from home
  • distance from the last transaction
  • median purchase price and current purchase price ratio
  • repeat retailer (yes or not)
  • used chip (yes or not)
  • used pin number (yes or not)
  • online order (yes or not)

Model evaluation

Model accuracy: 94.0 %

Model optimization

In this stage, I tuned the hyperparameters optimizing the model. By using GridSearchCV we find the best combination which result in the highest accuracy.

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.