-: Hi, and welcome
to the third major part of this course, Cluster Analysis.
I am very happy
that we will now explore a fundamentally
different data science method.
Technically speaking
cluster analysis is a multivariate statistical
technique that groups observations on the basis some
of their features or variables they are described by.
Maybe that's not the best way to present it.
Intuitively speaking, observations
in a data set can be divided into different groups
and sometimes this is very useful.
Let's quickly explore an example.
Here's a list of six countries:
USA, Germany, Australia,
UK, France, and Canada.
These are our observations.
Imagine we have already performed this mysterious
technique called cluster analysis, and we got three groups.
The first one is USA and Canada,
the second, Germany, UK and France,
and the third Australia.
We would call these three groups clusters
after a short glimpse of the three clusters
we can easily name them.
The first one shows countries in North America
the second one in Europe, and the third one, well
the third one shows a country in the continent Australia.
Obviously, the feature by which these countries
were clustered was geographic proximity,
and that's cluster analysis in a nutshell.
All right, let's practice a bit more with the same data.
What if we take the same six countries, but we
want to cluster them into two clusters?
Well, one results may be the following,
USA, Canada, UK, Germany, and France,
in the first one,
Australia in the second.
Can you think of names for these two clusters?
Well, the first one shows countries in the northern
hemisphere while the second countries
in the southern hemisphere.
Cool. It seems like clustering is not that hard after all.
Well, not always.
What if after dividing the observations in two clusters
we obtain this result instead
USA, Canada, UK and Australia in the first one,
and Germany and France in the second.
Can you think of what these clusters represent?
In the USA Canada, UK, and Australia,
English is an official language.
While in Germany and France, it isn't.
This is a fundamentally different clustering solution.
Both results are perfectly logical, but in a different way.
In the first two cases, we were differentiating the clusters
by geographic proximity while in the second, by language.
Geographic proximity and language are two different features
by which we can cluster the observations.
That is to say that cluster analysis is extremely intuitive
but definitely tricky.
After these brief examples,
what is the final goal of this approach?
The goal of clustering is to maximize the similarity
of observations within a cluster
and maximize the dissimilarity between clusters.
That, of course, is done
with respect to some feature or features.
All right.
In this section, we will explore several clustering problems
and we will learn how to perform cluster analysis
how to find the optimal number of clusters
how to identify appropriate features
and how to interpret the results.
Our main tool will be the SK Learn and PANDA'S packages.
Looking forward to exploring the examples together.
Thanks for watching.