Sei sulla pagina 1di 37

Clustering

Introduccin al Aprendizaje No supervisado


M.Sc. Carlo Corrales Capitulo Ocho

Aprendizaje Supervisado

Training set:
Andrew Ng

Aprendizaje no Supervisado

Training set:
Andrew Ng

Aplicaciones del clustering

Mar!et seg entation

Social networ! anal"sis

I age credit: NASA#$%&'Caltech#(. Churchwell )*niv. o+ ,isconsin- Madison.

Organize co puting clusters

Astrono ical data anal"sis

Andrew Ng

Clustering
Algorit o /' eans

Andrew Ng

Andrew Ng

Andrew Ng

Andrew Ng

Andrew Ng

Andrew Ng

Andrew Ng

Andrew Ng

Andrew Ng

Algoritmo K-means (ntrada: )n0 ero de clusters. Training set )drop convention.

Andrew Ng

Algoritmo K-means
1ando l" initialize cluster centroids 1epeat 2 +or 3 4 to :3 inde5 )+ro 4 to . o+ cluster centroid closest to +or 3 4 to :3 average ) ean. o+ points assigned to cluster 6
Andrew Ng

K-means para clusters no-separados


T'shirt sizing

,eight

7eight
Andrew Ng

Clustering
O8jetivo de Opti izacin

Objetivo de optimizacin K-means 3 inde5 o+ cluster )4-9-:- . to which e5a ple assigned 3 cluster centroid ) . 3 cluster centroid o+ cluster to which e5a ple assigned Opti ization o8jective: is currentl" has 8een

Andrew Ng

Algoritmo K-means 1ando l" initialize cluster centroids

1epeat 2 +or 3 4 to :3 inde5 )+ro 4 to . o+ cluster centroid closest to +or 3 4 to :3 average ) ean. o+ points assigned to cluster 6
Andrew Ng

Clustering
Inicializacin Aleatoria

Algoritmo K-means 1ando l" initialize cluster centroids

1epeat 2 +or 3 4 to :3 inde5 )+ro 4 to . o+ cluster centroid closest to +or 3 4 to :3 average ) ean. o+ points assigned to cluster 6
Andrew Ng

Inicializacin aleatoria Should have 1ando l" pic! e5a ples. Set e5a ples. training e;ual to these

Andrew Ng

ptimo Local
<uena solucin

Atrapados en pti os locales

Andrew Ng

Inicializacin Aleatoria =or i 3 4 to 4>> 2 1ando l" initialize /' eans. 1un /' eans. ?et Co pute cost +unction )distortion. 6 %ic! clustering that gave lowest cost
Andrew Ng

Clustering
(scogiendo el n0 ero de clusters

Cul es el correcto valor de K

Andrew Ng

Cul es el correcto valor de K

Andrew Ng

!scogiendo el valor de K (l8ow ethod:

Cost +unction

Cost +unction
4

)no. o+ clusters.

)no. o+ clusters.
Andrew Ng

!scogiendo el valor de K So eti es- "ouFre running /' eans to get clusters to use +or so e later#downstrea purpose. (valuate /' eans 8ased on a etric +or how well it per+or s +or that later purpose. (.g.
T'shirt sizing T'shirt sizing

,eight

,eight

7eight

7eight
Andrew Ng

%ro8le as

Andrew Ng

Andrew Ng

Andrew Ng

Andrew Ng

Andrew Ng

Andrew Ng

=IN

Andrew Ng

Potrebbero piacerti anche