All language subtitles for 001 K-Means Clustering_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian Download
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Instructor: Hey again.

We finished the last lecture with this graph.

It shows 1000 points and their centroid.

In cluster analysis,

that's how a cluster would look in two-dimensional space.

There are two dimensions or two features

based on which we are performing clustering.

For instance, the age and money spent

from our earlier example.

Certainly it makes no sense to have only one cluster,

so let me zoom out of this graph.

Here's a nice picture of clusters.

We can clearly see two clusters.

I'll also indicate their centroids.

If we want to identify three clusters,

this is the result we obtain,

and that's more or less how clustering works graphically.

Okay, how do we perform clustering in practice?

There are different methods we can apply

to identify clusters.

The most popular one is K-means,

so that's where we will start.

Let's simplify this scatter to 15 points,

so we can get a better grasp of what happens.

Cool.

Here's how K-means works.

First, we must choose how many clusters we'd like to have.

That's where this method gets its name from.

K stands for the number of clusters

we are trying to identify.

I'll start with two clusters.

The next step is to specify the cluster seeds.

A seed is basically a starting centroid.

It is chosen at random or is specified by the data scientist

based on prior knowledge about the data.

One of the clusters will be the green cluster.

The other one, the orange cluster, and these are the seeds.

The following step

is to assign each point on the graph to a seed,

which is done based on proximity.

For instance, this point is closer to the green seed

than to the orange one.

Therefore, it will belong to the green cluster.

This point, on the other hand, is closer to the orange seed.

Therefore, it will be a part of the orange cluster.

In this way, we can color all points on the graph

based on their Euclidean distance from the seeds.

Great.

The final step is to calculate the centroid

of the green points and the orange points.

The green seed will move closer to the green points

to become their centroid,

and the orange will do the same for the orange points.

From here, we would repeat the last two steps.

Let's recalculate the distances.

All the green points

are obviously closer to the green centroid,

and the orange points are closer to the orange centroid.

What about these two?

Both of them are closer to the green centroid,

so at this step, we will reassign them to the green cluster.

Finally, we must recalculate the centroids.

That's the new result.

Now, all the green points are closest to the green centroid

and all the orange ones to the orange.

We can no longer reassign points,

which completes the clustering process.

This is the two-cluster solution.

All right, so that's the whole idea behind clustering.

In order to solidify your understanding,

we will redo the process.

In the beginning, we said that with K-means clustering,

we must specify the number of clusters

prior to clustering, right?

What if we wanna obtain three clusters?

The first step involves selecting the seeds.

Let's have another seed.

We'll use red for this one.

Next, we must associate each of the points

with the closest seed.

Finally, we calculate the centroids of the colored points.

We already know that K-means is an iterative process,

so we go back to the step

where we associate each of the points with the closest seed.

All orange points are settled, so no movement there.

What about these two points?

Now they're closer to the red seed,

so they will go into the red cluster.

That's the only change in the whole graph.

In the end, we recalculate the centroids

and reach a situation

where no more adjustments are necessary

using the K-means algorithm.

We have reached a three-cluster solution.

This is the exact algorithm

which was used to find the solution

of the problem you saw at the beginning of the lesson.

Here's a Python-generated graph

with the three clusters colored.

I'm sorry they're not the same, but you get the point.

That's how we would usually

represent the clusters graphically.

Great.

I think we have a good basis to start coding.

See you in the next lecture.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.