Giter VIP home page Giter VIP logo

clustering_customers's Introduction

Clustering Bank Customers

  • What: Identify customer groups & demographics from banking behaviour data
  • How: Through EDA, feature engineering, PCA and K-means clustering
  • Why: Better understand different types of customers and how best to serve their needs on our service. This will enable better customer engagement and satisfaction with our service offerings, ultimately creating increased brand equity.

Process

Process Flow


Data

Account and transaction data from customers in 1995 has been used for this project. Connecting to an externally hosted database I explores the structure and relationships between tables using SQL. Initial EDA was then done server side and only when needed data was extracted to be using in a Jupyter Notebook.

DB Tables

I have included a SQLite file in this repo to show the data being worked with if you would like to explore. There is also a 'sql_scrap' file which I used as a rough doc to do a few basic queries.


Results

The aim was to keep our clusters to a maximum of 5.

  • Approach 1: Using only demographic data from accounts
  • Approach 2: Using transactional data to cluster

Approach 1: Demographic Data

Cleaning and transforming the data features used were: A1 Features

PCA was then used to allow visualizations in lower dimensions. As a rule of thumb, the aim was to have 85% of variance explained in the reduced dimensions.

A1 Radial Chart


Approach 2: Transactional Data

For this approach I explored engineering a variety of features. The final two I landed on that had beneficial impact in segmenting customers was:

  • Credit to Income Ratio
  • Avg spend per transaction

As seen in the Cumulative Explained Variance and Scree plots bellow, 6 dimensions was the sweet spot for explaining 85% of the variance. This however does make it more difficult to visualize the total relationships as we only have 2/3/4 dimensions that we can perceive. PCA

Plotting these in 3 dimensions we can see some clear segmentation. This can be tuned further to segment more groups that the current 5. A2 3D Plot

Creating a Radio Chart of the 5 customer groups we can see some clear parameters of each. A2 Radial Chart

Side by side we can see the different attributes of each group more clearly A2 Radial Chart


Conclusion

Clustering demographic & transaction data is a start to better understand our customers. Through building this knowledge we are to better serve user needs, optimize product offerings and ultimately take a step towards personalization at scale.

Back to Top

clustering_customers's People

Contributors

the-powder-of-data 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.