Skip to content

Machine Learning Model to analyse the a Company's market data to improve the sales

Notifications You must be signed in to change notification settings

vilasrhegde/Marketdata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Market data Analysis using K-means Clustering

An Unsupervised machine learning algorithm to create a model with Python

What it is all about?

  • Taking a company's dataset about all purchased made and details of customers

  • Depending on these data we create Clusters to understand it in a more better way

  • Here we have done 5 clusters and given 5 different colours namely,

    1. Red
    2. Green
    3. Blue
    4. Black
    5. Violet
  • All the co-ordinates are labelled accordingly. Here I took 3 labels

    1. Customer groups
    2. Spending scores (1-100)
    3. Annual income
  • Here we can get the clear picture of customer-sales data.

  • Now it can be used to analyse and take a correct decision to increase profit and also user needs.

Packages used

  • Numpy
  • Pandas
  • Seaborn
  • Matplotlib
  • Sklearn

image

The Process

The Dataset that I have used for this project is from Kaggle

image

A little peak into dataset

image

Checked for any missing data in the csv file, these fill feed false data into our model and we will loose accuracy

  • Slicing of multiple columns
x=customer_data.iloc[:,[3,4]].values 
  • Finding WCSS value for each clusters and store it for a list

WCSS -> Within Clusters Sum Of Squares Distance b/w each clusters and centroid

we get,

image

Observe sharp cuttings suggests significant drop

  • Training the KMeans model kmeans = KMeans(n_clusters=5,init='k-means++',random_state=0)

  • Doing prediction from the trained model, it'll give in ununderstandable format which is list of numbers

  • So we scatter all the clusters and their centroids

  • Based on x,y coordinate different colours have given to distinguish the clusters easily

  • Then using matplotlb we plot the graph like this

image

Conclusion

  • By visualising the data we can understand these like,
    • Blue = less income and less purchase
    • Purple = less income and more purchase
    • Green = more income and less purchase
    • Black = more income more purchase
  • Market can attract Blue group people providing some discounts
  • Market can attract Green region people who have money but not buying more things

Applications

  • Netflix suggesting group of people who are watching some genre more
  • Google ads personalisation

About

Machine Learning Model to analyse the a Company's market data to improve the sales

Topics

Resources

Stars

Watchers

Forks