And here is our hierarchical clustering results obtained in R.
So let's have a closer look at these clusters and understand what they are.
Our first cluster is cluster one which is the blue cluster right here.
And it contains the customers that have high income and high spinning score.
So that's an interesting cluster for the mall because customers
in this cluster have a high income and spend a lot of money in the mall.
So this cluster would be a good target of the mall marketing campaigns.
And so we can call this cluster the target one.
Okay.
Now cluster two close to two contains the customers
that have high income and low spending score.
And so we can call these customers to careful customers.
Now cluster three
customers in this cluster have average income and average spending score.
So we call this cluster the standard cluster.
Now Christopher cluster four has the customers
that have low income and low spending score.
So that's basically sensible customers who pay attention to the money
they spend by paying attention to the money they earn.
And eventually cluster five contains
the customers that have low income but high spinning score.
So these are customers who are rather careless, especially that
199 customer here who earns low income but spends a lot of money.
So this one should particularly be careful.
And actually, this cluster five here could be a very interesting cluster
for the company if the latter has a social responsibility,
as it is the case for more and more companies today.
All right.
So we are done with hierarchical clustering and R
if you want to reuse this code for your business problem it's very easy.
You just have to change the name of the data set here.
Then change the indexes of your columns of interest just below.
However, if you do clustering in more than two dimensions,
don't execute the last section.
Visualizing the clusters because it's only for two dimensions.
But don't delete this section and leave it as comments,
because later in this course we will learn a super powerful technique called
dimensionality reduction that will reduce the dimensions
of your data to perhaps two dimensions, so that you can use this final section,
visualizing the clusters to see your clusters in two dimensions.
All right.
So that's the end of hierarchical clustering in R.
And that's also the end of hierarchical clustering.
And in the next section we will recap everything we've learned in clustering.
Thank you for watching this tutorial.
I hope you are now more comfortable with doing clustering in R or Python.
I look forward to seeing you in the next tutorials
and until then, happy clustering!