By Sahib Arora
This project in Python will help malls target the right customers to buy a shopping card. As it divides the customers into 5 categories based on income and score.
The code starts by importing the necessary libraries, after which the data set is read into the jupyter notebook using pandas library. After which the data set is divided into two rows that is annual income and spending score (Here the score depends on how much an individual spends in the mall). Then we use a clustering algorithm called Hierarchical clustering. This algorithm uses dendograms to find dividing points in the dataset and divides the data set based on these dividing points into 5 categories (low salary-low score, low salary-high score, average salary-average score, high salary-low score, high salary-high score) . We use the scikit learn library to plot the dendogram. After whhich we use the Agglomerative algorithm to plot the clusters where the x-axis is the spending score and the y-axis is the annual salary.
Submitted by Sahib Arora (sahib2905)
Download packets of source code on Coders Packet