Alone Welcome back.
This is video 3 unit 3 and it's going to convert cluster analysis.
And once this is presented by Iraq's cluster analysis very important in industry this is going to be
arguably the most popular or primary application of unsupervised learning does.
You're going to stand a video talking about how it is implemented.
So this is probably the most important one in this unit on unsupervised learning because it's going
to be arguably what you're most likely to use in the future.
So pay attention and let's dive right in.
So cluster analysis or also call data segmentation has a variety of goals in all of these goals relate
to or segmenting a collection of objects into subsets or clusters such that those within each cluster
are going to be more closely related to one another than objects assigned to different clusters.
So an object can be described by a set of measurements or this relation to other objects.
And your analysis is also used for descriptive statistics to ascertain whether or not the data consists
of a set of distinct groups each group representing objects with substantially different properties.
So this is an assessment of a degree of difference between the objects assigned to the respective clusters.
So we're on the right.
You see an example of cluster analysis and this is just simulated data.
But it was randomly distributed and it is meant to get three clusters.
So you see our reading of the top then that we were in the middle and the orange in the bottom.
I'm looking at this data if it was all just black points it would be hard to say that there were three
distinct points.
But this is an example of the U.S. team is clustering where X absolutely able to show mathematically
that they can be separated into these distinct groups.
So central to all of these goals or goals of cluster analysis is the notion of the degree of similarity
or are we more often than not you're going to hear it is referred to as dissimilarity.
And this is the just similarity between the individual objects being clustered so clustering method
attempts to group the objects is based on a definition of Salom similarity supplied to it.
So this can only come from subject matter considerations.
So our definition of similarity is going to depend on the data that we're looking at.
And then you know to what we did our project we made sure that we did several bed and visualisation
steps foot for actually playing in our rhythm so that we could understand the debt that we were looking
at in machine learning once again is very important that you understand your underlying debt so that
you can pick the most appropriate model or in this case the most appropriate measure of similarity.
So this situation is somewhat similar to the specification of a loss or a cost function a predictable
problems like the ones we talked about in our unit to unsupervised learning.
So now that we have this definition of singularity out there we can update our rule of these cluster
analysis algorithms and that will lead to partitioning observations into groups so that the pairwise
dissimilarities between those assigned to the same cluster tend to be smaller and those different clusters.
So here is our our official goal complete with our application of dissimilarities.
This is what we're looking for in cluster analysis.
So just to look at the cut a couple of different algorithms that can be used to accomplish this goal.
So these are the three main types of clustering algorithms.
The first one being the dominant Tauriel our rhythms.
So in these rhythms we are going to work directly on the observed data with no direct reference to an
underlying probability model.
So we're not going to assume that that distribution is Gaussian.
This will be considered perhaps a non metric approach.
We talked about that in our radio non-parametric versus parametric where we do assume such distributions
such as Gaussian.
And this is going to be us is that no underlying assumptions we're going to work directly on the observed
data.
The next one is mixed modeling.
So this is going to be the parametric curve approach Netta's supposes that the data is a sample from
some population be described by a probability density function.
So this density function is characterized by a parameterised model taking to be a mixture of component
density functions.
So each density describes one or the postures.
This model is that because the data by mass is by maximizing the likelihood or or slightly change in
approaches.
So in this approach we're going to have different clusters for I assume that each cluster has its own
probability distribution such as a Gaussian distribution or other similar model such as that.
We're going to separated into distinct clusters where each Gloucester has that distribution.
You don't have to use just the distributions one cluster could be a gas whereas an hour could have like
a Bernoulli distribution or some other type of distribution.
So that's mission modeling.
And our third one is going to be called moseyed Sumate series taking non-parametric perspective and
they attempt to directly estimate distinct modes the probability density function so observations closest
to the suspect and then divide the individual clusters.
So we previously touched on Node hunting or bump hante you might hear this is the third type of clustering.
Other than that mostly we're not going to touch on it very much but it does come up so it's important
to know that we're going to talk exclusively about jailings Castree and this is because it is by far
the most popular common injuria of rhythm which is by far the most common type of clustering outdrew
them.
So more often than not we're going to see genes upstream.
So let's go ahead and dive right into that.
Explain it.
What we look at some of the map are at it and as well an example of Kings street use.
All right.
So here's Keeling's cluster Alekhine's our'n is one of the most popular.
It does say clustering methods.
It is intended for situations in situations in which all the variables are the quantity and the type.
So we have numerical values and then the similarity measure is often chosen to be that you create distance.
So it's example that we're going to look at is going to be a two dimensional example so it's very easy
for us to use you claim distance.
However there might be the case where we have higher dimensions and then you have to do damage reductions
for it to apply plane distance or something like that.
In these examples in the case here in Kamins clustering is going to refer to the numbers of clusters
that we choose.
And this is a value that's predefined.
So we can pick the number of clusters we might not know how many clusters there should be and then we
have to do a like I guess object type method where we maybe use a key means method with a variety of
different clusters cluster numbers and then choose the one which has the best output.
So let's go in and take a look at the actual outbreed.
So here is Kamins clustering.
And so we're going to start with a three step process and where this begins.
Each of these clusters is going to be initialized with random strangers or randomly going to peg points
throughout our distribution of inputs and define him as our cluster centers so that we have something
to start on iterate on and then from there each data point is going to be assigned to the closest cluster
said Clady distance thumb.
And that's going to be defined as such.
So next to each cluster center is going to be updated and it's going to be replaced by the cornet wise
average of all the data points that are closest to it.
So this is why it doesn't matter that we start with random weights.
And that is actually beneficial to start with random weights because the means clustering over them
is not guaranteed to find a lot.
So in fact when you're using this method you want to start with a several different random initially
initiate initiation into gear and go from there to see which one binds the best minimum.
Because again we're not guaranteed to find the minimum.
It's so our last part of this is just repeat these steps.
Finding that closest center and then updating the center average until the assignments do not change
and all the points are linked to their respective clusters.
A exam look an example of this because it actually will help clarify how this works much better.
So this is a key needs example ending up.
You see our debt there.
This is just a random distribution randomly generated.
All points are in black.
So we have no clusters yet.
Step one we're going to assign them to random clusters.
So it's all yours first.
For this example we're picking three clusters.
And then in our in our talk rate example we randomly initialized our cluster centers.
So we have three cluster centers.
These are based pretty much exclusively right in the middle with some slight differences.
And in order to serve iterating over this data.
So in the bottom left each depth when it is assigned to the cluster of the closest center in Euclidean
distance.
So we have our three separate clusters Now you see we have our option per or peak in the bottom our
read or orange as defined by the closest center in the middle.
We update the location of that cluster center.
So now you see it's moved pretty much pretty dramatically outwards and we continue doing that until
our assignments between clusters don't change.
So if you look at the middle bottom versus the right bottom image here you'll see that the peak actually
uses many of the data points on that right and those end up being assigned to the green cluster as well.
So from the bottom point in the cluster end up being assigned later to RPE or Gloucester's So this algorithm
it is all resolved until once again we find that minimal.
It's important to remember that it's not a woman on Sachi this process should be repeated using different
initial age initial parameters each time so that we can try to search for the best.
So it might be that this is the global M.O. but it's important to try to star in different scenarios
so that we can we can check that.
And it's also again important to start with a different number of clusters which should probably check
to fosters because these could probably be better separated into two clusters.
We can check with three or four maybe even more clusters.
And this is again one of the main reasons why is really important that we understand our underlying
data.
So we have data subject matter considerations to take into account when applying these algorithms.
So that is canings post-Reagan nutshell here is a quick summary cluster analysis attempts to segment
a collection of objects into subsets or clusters such that those within each cluster are closely related
to one another than the objects assigned to different clusters.
So this is the goal and approach a clustering analysis and more specifically Kamins clustering is the
most popular common tutorial how rhythm clustering and use is in the root of this cluster quantity of
variables uniquely in existence as the similarity measure.
So those the main takeaways from this video.
I'm actually going to look at a live kirtan example of canings clustering.
So that'll be exciting.
Now being tried for this unit but for that actually the next video we're going to talk about reinforcement
learning.
So once again reinforcement learning isn't necessarily unsupervised learning but it's not big enough
to have unit of its own.
So we're going to talk about it here now reinforcement learning is actually one of the most exciting
parts of machine learning research today at least in my opinion.
Reinforcement learning is kind of what's assumed.
We're talking about things such as artificial intelligence.
It's based on psychology and systems.
But we'll talk about that in the next video so that will be exciting.
Keep listening.
Thanks.