Code Monkey home page Code Monkey logo

tahsin-mayeesha / credit-card-recommender-django-app-and-chatbot Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 24.68 MB

Credit card recommender system built from collected card data from Bangladeshi banks. Model built with scikit-learn. Django app and chatbot integeration from dialogflow.

Python 87.94% HTML 6.20% CSS 1.63% JavaScript 2.26% Jupyter Notebook 1.77% Tcl 0.17% PowerShell 0.01% Batchfile 0.01%
django dialogflow scikit-learn unsupervised-learning

credit-card-recommender-django-app-and-chatbot's Introduction

Post

Building a Credit Card Recommender with Scikit-Learn and deploying on web and Chatbot

Context

Bangladesh is a developing country whose economy is growing fast. The GDP per capita of Bangladesh has grown to 1516 USD in 2017 compared to 88 USD of 1960. Individuals have more disposable income now and the infrastructure of the country has also improved a lot. Most banks have ATM booths all over the country.

Bangladesh most definitely does not have a cashless economy, but the credit card usage is growing. Grocery super shops, mobile, electronics companies, hotels, resorts, restaurants all offer different sort of discounts based on the card that is being used for payment. Given that , this project focused on making a credit card recommendation system.

Model

Cards are recommended based on only card features and use a similarity measure to recommend similar cards per user preference. Apart from the card features, location of the user was also considered. Even if the card preferences matched, the user may not have any nearby offices for the bank in the remote areas of Bangladesh as an agricultural country.

We collected data on 130 cards from 15+ unique banks. Features like card type, interest rate, credit limit, rewards associated with the card etc were collected. Since the bank providers change website design frequently and the data we’re collecting is small, I didn’t scrape the data by choice because writing scraper for all different bank websites would have been time consuming. All information that was collected is public.

Dataset

The model is a basic nearest neighbor based model trained on scikit-learn which I pickled for deployment.

For input the model takes in different preferences from the user , the outputs are the recommendation scores and indices from the unsupervised nearest neighbor models.

The location API used was HERE Technologies . For showing nearby banks the user inputs the area and the city, HERE API unfortunately is not that precise for countries like Bangladesh. Then the text is geocoded using the HERE geocoding API and the extracted latitude and longitude is used to search through the nearby banks in a given radius.

Google Dialogflow Integration

Google dialogflow was used for making a chatbot which will recommend credit cards. The dialogflow code uses the same pickled model.

When a user talks to the chatbot dialogflow assumes the user has some intent. In this case we assume the intent is to find a credit or debit card recommendation. The intent can collect data from users with entities. For example an entity card-type may have multiple values like credit, debit or prepaid. Dialogflow connects with the server via webhook and server returns the recommendations.

Chatbot Demo

This is a demo conversation.

credit-card-recommender-django-app-and-chatbot's People

Contributors

chowdhurynovera avatar dependabot[bot] avatar sakib49 avatar tahsin-mayeesha avatar tashfiqchoudhury avatar

Stargazers

 avatar

Watchers

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