Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...•...

84
Data Mining: 5. Algoritma Klastering 5. Algoritma Klastering ABM ABM 1

Transcript of Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...•...

Page 1: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

Data Mining:5. Algoritma Klastering

Data Mining:5. Algoritma Klastering

ABMABM

1

Page 2: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

2. Proses Data Mining

1. Pengantar Data Mining

Course Outline

6. Algoritma Asosiasi

5. Algoritma Klastering

4. Algoritma Klasifikasi

3. Persiapan Data

8. Text Mining

7. Algoritma Estimasi dan Forecasting

6. Algoritma Asosiasi

2

Page 3: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

5. Algoritma Klastering5.1 Cluster Analysis: Basic Concepts

5.2 Partitioning Methods

5.3 Hierarchical Methods

5.4 Density-Based Methods

5.5 Grid-Based Methods

5.6 Evaluation of Clustering

5.1 Cluster Analysis: Basic Concepts

5.2 Partitioning Methods

5.3 Hierarchical Methods

5.4 Density-Based Methods

5.5 Grid-Based Methods

5.6 Evaluation of Clustering

3

Page 4: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

5.1 Cluster Analysis: Basic Concepts

4

Page 5: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Cluster: A collection of data objects• similar (or related) to one another within the same

group• dissimilar (or unrelated) to the objects in other groups

• Cluster analysis (or clustering, data segmentation, …)• Finding similarities between data according to the

characteristics found in the data and grouping similardata objects into clusters

• Unsupervised learning: no predefined classes (i.e., learningby observations vs. learning by examples: supervised)

• Typical applications• As a stand-alone tool to get insight into data distribution• As a preprocessing step for other algorithms

What is Cluster Analysis?

• Cluster: A collection of data objects• similar (or related) to one another within the same

group• dissimilar (or unrelated) to the objects in other groups

• Cluster analysis (or clustering, data segmentation, …)• Finding similarities between data according to the

characteristics found in the data and grouping similardata objects into clusters

• Unsupervised learning: no predefined classes (i.e., learningby observations vs. learning by examples: supervised)

• Typical applications• As a stand-alone tool to get insight into data distribution• As a preprocessing step for other algorithms

• Cluster: A collection of data objects• similar (or related) to one another within the same

group• dissimilar (or unrelated) to the objects in other groups

• Cluster analysis (or clustering, data segmentation, …)• Finding similarities between data according to the

characteristics found in the data and grouping similardata objects into clusters

• Unsupervised learning: no predefined classes (i.e., learningby observations vs. learning by examples: supervised)

• Typical applications• As a stand-alone tool to get insight into data distribution• As a preprocessing step for other algorithms

5

Page 6: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Data reduction• Summarization: Preprocessing for regression, PCA,

classification, and association analysis• Compression: Image processing: vector quantization

• Hypothesis generation and testing• Prediction based on groups

• Cluster & find characteristics/patterns for each group

• Finding K-nearest Neighbors• Localizing search to one or a small number of clusters

• Outlier detection: Outliers are often viewed as those “faraway” from any cluster

Applications of Cluster Analysis

• Data reduction• Summarization: Preprocessing for regression, PCA,

classification, and association analysis• Compression: Image processing: vector quantization

• Hypothesis generation and testing• Prediction based on groups

• Cluster & find characteristics/patterns for each group

• Finding K-nearest Neighbors• Localizing search to one or a small number of clusters

• Outlier detection: Outliers are often viewed as those “faraway” from any cluster

• Data reduction• Summarization: Preprocessing for regression, PCA,

classification, and association analysis• Compression: Image processing: vector quantization

• Hypothesis generation and testing• Prediction based on groups

• Cluster & find characteristics/patterns for each group

• Finding K-nearest Neighbors• Localizing search to one or a small number of clusters

• Outlier detection: Outliers are often viewed as those “faraway” from any cluster

6

Page 7: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Biology: taxonomy of living things: kingdom, phylum,class, order, family, genus and species

• Information retrieval: document clustering• Land use: Identification of areas of similar land use in

an earth observation database• Marketing: Help marketers discover distinct groups in

their customer bases, and then use this knowledge todevelop targeted marketing programs

• City-planning: Identifying groups of houses according totheir house type, value, and geographical location

• Earth-quake studies: Observed earth quake epicentersshould be clustered along continent faults

• Climate: understanding earth climate, find patterns ofatmospheric and ocean

• Economic Science: market research

Clustering: Application Examples

• Biology: taxonomy of living things: kingdom, phylum,class, order, family, genus and species

• Information retrieval: document clustering• Land use: Identification of areas of similar land use in

an earth observation database• Marketing: Help marketers discover distinct groups in

their customer bases, and then use this knowledge todevelop targeted marketing programs

• City-planning: Identifying groups of houses according totheir house type, value, and geographical location

• Earth-quake studies: Observed earth quake epicentersshould be clustered along continent faults

• Climate: understanding earth climate, find patterns ofatmospheric and ocean

• Economic Science: market research

• Biology: taxonomy of living things: kingdom, phylum,class, order, family, genus and species

• Information retrieval: document clustering• Land use: Identification of areas of similar land use in

an earth observation database• Marketing: Help marketers discover distinct groups in

their customer bases, and then use this knowledge todevelop targeted marketing programs

• City-planning: Identifying groups of houses according totheir house type, value, and geographical location

• Earth-quake studies: Observed earth quake epicentersshould be clustered along continent faults

• Climate: understanding earth climate, find patterns ofatmospheric and ocean

• Economic Science: market research7

Page 8: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Feature selection• Select info concerning the task of interest• Minimal information redundancy

• Proximity measure• Similarity of two feature vectors

• Clustering criterion• Expressed via a cost function or some rules

• Clustering algorithms• Choice of algorithms

• Validation of the results• Validation test (also, clustering tendency test)

• Interpretation of the results• Integration with applications

Basic Steps to Develop a Clustering Task• Feature selection

• Select info concerning the task of interest• Minimal information redundancy

• Proximity measure• Similarity of two feature vectors

• Clustering criterion• Expressed via a cost function or some rules

• Clustering algorithms• Choice of algorithms

• Validation of the results• Validation test (also, clustering tendency test)

• Interpretation of the results• Integration with applications

• Feature selection• Select info concerning the task of interest• Minimal information redundancy

• Proximity measure• Similarity of two feature vectors

• Clustering criterion• Expressed via a cost function or some rules

• Clustering algorithms• Choice of algorithms

• Validation of the results• Validation test (also, clustering tendency test)

• Interpretation of the results• Integration with applications

8

Page 9: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• A good clustering method will produce high qualityclusters

• high intra-class similarity: cohesive within clusters• low inter-class similarity: distinctive between clusters

• The quality of a clustering method depends on• the similarity measure used by the method• its implementation, and• Its ability to discover some or all of the hidden patterns

Quality: What Is Good Clustering?

• A good clustering method will produce high qualityclusters

• high intra-class similarity: cohesive within clusters• low inter-class similarity: distinctive between clusters

• The quality of a clustering method depends on• the similarity measure used by the method• its implementation, and• Its ability to discover some or all of the hidden patterns

• A good clustering method will produce high qualityclusters

• high intra-class similarity: cohesive within clusters• low inter-class similarity: distinctive between clusters

• The quality of a clustering method depends on• the similarity measure used by the method• its implementation, and• Its ability to discover some or all of the hidden patterns

9

Page 10: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Dissimilarity/Similarity metric• Similarity is expressed in terms of a distance function,

typically metric: d(i, j)• The definitions of distance functions are usually rather

different for interval-scaled, boolean, categorical,ordinal ratio, and vector variables

• Weights should be associated with different variablesbased on applications and data semantics

• Quality of clustering:• There is usually a separate “quality” function that

measures the “goodness” of a cluster.• It is hard to define “similar enough” or “good enough”

• The answer is typically highly subjective

Measure the Quality of Clustering

• Dissimilarity/Similarity metric• Similarity is expressed in terms of a distance function,

typically metric: d(i, j)• The definitions of distance functions are usually rather

different for interval-scaled, boolean, categorical,ordinal ratio, and vector variables

• Weights should be associated with different variablesbased on applications and data semantics

• Quality of clustering:• There is usually a separate “quality” function that

measures the “goodness” of a cluster.• It is hard to define “similar enough” or “good enough”

• The answer is typically highly subjective

• Dissimilarity/Similarity metric• Similarity is expressed in terms of a distance function,

typically metric: d(i, j)• The definitions of distance functions are usually rather

different for interval-scaled, boolean, categorical,ordinal ratio, and vector variables

• Weights should be associated with different variablesbased on applications and data semantics

• Quality of clustering:• There is usually a separate “quality” function that

measures the “goodness” of a cluster.• It is hard to define “similar enough” or “good enough”

• The answer is typically highly subjective

10

Page 11: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Partitioning criteria• Single level vs. hierarchical partitioning (often, multi-level

hierarchical partitioning is desirable)

• Separation of clusters• Exclusive (e.g., one customer belongs to only one region) vs. non-

exclusive (e.g., one document may belong to more than one class)

• Similarity measure• Distance-based (e.g., Euclidian, road network, vector) vs.

connectivity-based (e.g., density or contiguity)

• Clustering space• Full space (often when low dimensional) vs. subspaces (often in

high-dimensional clustering)

Considerations for Cluster Analysis

• Partitioning criteria• Single level vs. hierarchical partitioning (often, multi-level

hierarchical partitioning is desirable)

• Separation of clusters• Exclusive (e.g., one customer belongs to only one region) vs. non-

exclusive (e.g., one document may belong to more than one class)

• Similarity measure• Distance-based (e.g., Euclidian, road network, vector) vs.

connectivity-based (e.g., density or contiguity)

• Clustering space• Full space (often when low dimensional) vs. subspaces (often in

high-dimensional clustering)

• Partitioning criteria• Single level vs. hierarchical partitioning (often, multi-level

hierarchical partitioning is desirable)

• Separation of clusters• Exclusive (e.g., one customer belongs to only one region) vs. non-

exclusive (e.g., one document may belong to more than one class)

• Similarity measure• Distance-based (e.g., Euclidian, road network, vector) vs.

connectivity-based (e.g., density or contiguity)

• Clustering space• Full space (often when low dimensional) vs. subspaces (often in

high-dimensional clustering)

11

Page 12: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Scalability• Clustering all the data instead of only on samples

• Ability to deal with different types of attributes• Numerical, binary, categorical, ordinal, linked, and mixture of

these• Constraint-based clustering

• User may give inputs on constraints• Use domain knowledge to determine input parameters

• Interpretability and usability• Others

• Discovery of clusters with arbitrary shape• Ability to deal with noisy data• Incremental clustering and insensitivity to input order• High dimensionality

Requirements and Challenges

• Scalability• Clustering all the data instead of only on samples

• Ability to deal with different types of attributes• Numerical, binary, categorical, ordinal, linked, and mixture of

these• Constraint-based clustering

• User may give inputs on constraints• Use domain knowledge to determine input parameters

• Interpretability and usability• Others

• Discovery of clusters with arbitrary shape• Ability to deal with noisy data• Incremental clustering and insensitivity to input order• High dimensionality

• Scalability• Clustering all the data instead of only on samples

• Ability to deal with different types of attributes• Numerical, binary, categorical, ordinal, linked, and mixture of

these• Constraint-based clustering

• User may give inputs on constraints• Use domain knowledge to determine input parameters

• Interpretability and usability• Others

• Discovery of clusters with arbitrary shape• Ability to deal with noisy data• Incremental clustering and insensitivity to input order• High dimensionality

12

Page 13: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Partitioning approach:• Construct various partitions and then evaluate them by some

criterion, e.g., minimizing the sum of square errors• Typical methods: k-means, k-medoids, CLARANS

• Hierarchical approach:• Create a hierarchical decomposition of the set of data (or

objects) using some criterion• Typical methods: Diana, Agnes, BIRCH, CAMELEON

• Density-based approach:• Based on connectivity and density functions• Typical methods: DBSACN, OPTICS, DenClue

• Grid-based approach:• based on a multiple-level granularity structure• Typical methods: STING, WaveCluster, CLIQUE

Major Clustering Approaches 1

• Partitioning approach:• Construct various partitions and then evaluate them by some

criterion, e.g., minimizing the sum of square errors• Typical methods: k-means, k-medoids, CLARANS

• Hierarchical approach:• Create a hierarchical decomposition of the set of data (or

objects) using some criterion• Typical methods: Diana, Agnes, BIRCH, CAMELEON

• Density-based approach:• Based on connectivity and density functions• Typical methods: DBSACN, OPTICS, DenClue

• Grid-based approach:• based on a multiple-level granularity structure• Typical methods: STING, WaveCluster, CLIQUE

• Partitioning approach:• Construct various partitions and then evaluate them by some

criterion, e.g., minimizing the sum of square errors• Typical methods: k-means, k-medoids, CLARANS

• Hierarchical approach:• Create a hierarchical decomposition of the set of data (or

objects) using some criterion• Typical methods: Diana, Agnes, BIRCH, CAMELEON

• Density-based approach:• Based on connectivity and density functions• Typical methods: DBSACN, OPTICS, DenClue

• Grid-based approach:• based on a multiple-level granularity structure• Typical methods: STING, WaveCluster, CLIQUE

13

Page 14: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Model-based:• A model is hypothesized for each of the clusters and tries to

find the best fit of that model to each other• Typical methods: EM, SOM, COBWEB

• Frequent pattern-based:• Based on the analysis of frequent patterns• Typical methods: p-Cluster

• User-guided or constraint-based:• Clustering by considering user-specified or application-

specific constraints• Typical methods: COD (obstacles), constrained clustering

• Link-based clustering:• Objects are often linked together in various ways• Massive links can be used to cluster objects: SimRank,

LinkClus

Major Clustering Approaches 2

• Model-based:• A model is hypothesized for each of the clusters and tries to

find the best fit of that model to each other• Typical methods: EM, SOM, COBWEB

• Frequent pattern-based:• Based on the analysis of frequent patterns• Typical methods: p-Cluster

• User-guided or constraint-based:• Clustering by considering user-specified or application-

specific constraints• Typical methods: COD (obstacles), constrained clustering

• Link-based clustering:• Objects are often linked together in various ways• Massive links can be used to cluster objects: SimRank,

LinkClus

• Model-based:• A model is hypothesized for each of the clusters and tries to

find the best fit of that model to each other• Typical methods: EM, SOM, COBWEB

• Frequent pattern-based:• Based on the analysis of frequent patterns• Typical methods: p-Cluster

• User-guided or constraint-based:• Clustering by considering user-specified or application-

specific constraints• Typical methods: COD (obstacles), constrained clustering

• Link-based clustering:• Objects are often linked together in various ways• Massive links can be used to cluster objects: SimRank,

LinkClus

14

Page 15: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

5.2 Partitioning Methods

15

Page 16: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Partitioning method: Partitioning a database D of n objectsinto a set of k clusters, such that the sum of squareddistances is minimized (where ci is the centroid or medoid ofcluster Ci)

• Given k, find a partition of k clusters that optimizes thechosen partitioning criterion

• Global optimal: exhaustively enumerate all partitions• Heuristic methods: k-means and k-medoids algorithms• k-means (MacQueen’67, Lloyd’57/’82): Each cluster is represented by

the center of the cluster• k-medoids or PAM (Partition around medoids) (Kaufman &

Rousseeuw’87): Each cluster is represented by one of the objects in thecluster

Partitioning Algorithms: Basic Concept

• Partitioning method: Partitioning a database D of n objectsinto a set of k clusters, such that the sum of squareddistances is minimized (where ci is the centroid or medoid ofcluster Ci)

• Given k, find a partition of k clusters that optimizes thechosen partitioning criterion

• Global optimal: exhaustively enumerate all partitions• Heuristic methods: k-means and k-medoids algorithms• k-means (MacQueen’67, Lloyd’57/’82): Each cluster is represented by

the center of the cluster• k-medoids or PAM (Partition around medoids) (Kaufman &

Rousseeuw’87): Each cluster is represented by one of the objects in thecluster

21 )),(( iCp

ki cpdE

i

• Partitioning method: Partitioning a database D of n objectsinto a set of k clusters, such that the sum of squareddistances is minimized (where ci is the centroid or medoid ofcluster Ci)

• Given k, find a partition of k clusters that optimizes thechosen partitioning criterion

• Global optimal: exhaustively enumerate all partitions• Heuristic methods: k-means and k-medoids algorithms• k-means (MacQueen’67, Lloyd’57/’82): Each cluster is represented by

the center of the cluster• k-medoids or PAM (Partition around medoids) (Kaufman &

Rousseeuw’87): Each cluster is represented by one of the objects in thecluster

16

Page 17: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Given k, the k-means algorithm is implemented in four steps:

1. Partition objects into k nonempty subsets

2. Compute seed points as the centroids of the clustersof the current partitioning (the centroid is the center,i.e., mean point, of the cluster)

3. Assign each object to the cluster with the nearest seedpoint

4. Go back to Step 2, stop when the assignment does notchange

The K-Means Clustering Method

• Given k, the k-means algorithm is implemented in four steps:

1. Partition objects into k nonempty subsets

2. Compute seed points as the centroids of the clustersof the current partitioning (the centroid is the center,i.e., mean point, of the cluster)

3. Assign each object to the cluster with the nearest seedpoint

4. Go back to Step 2, stop when the assignment does notchange

• Given k, the k-means algorithm is implemented in four steps:

1. Partition objects into k nonempty subsets

2. Compute seed points as the centroids of the clustersof the current partitioning (the centroid is the center,i.e., mean point, of the cluster)

3. Assign each object to the cluster with the nearest seedpoint

4. Go back to Step 2, stop when the assignment does notchange

17

Page 18: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

An Example of K-Means Clustering

K=2

Arbitrarilypartitionobjects intok groups

K=2

Arbitrarilypartitionobjects intok groups

Update theclustercentroids

Reassign objectsLoop ifneeded

The initial data set

Partition objects into knonempty subsets

Repeat Compute centroid (i.e., mean

point) for each partition Assign each object to the

cluster of its nearest centroid Until no change

18

Update theclustercentroids

Partition objects into knonempty subsets

Repeat Compute centroid (i.e., mean

point) for each partition Assign each object to the

cluster of its nearest centroid Until no change

Page 19: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

1. Pilih jumlah klaster k yang diinginkan2. Inisialisasi k pusat klaster (centroid) secara random3. Tempatkan setiap data atau objek ke klaster terdekat. Kedekatan

dua objek ditentukan berdasar jarak. Jarak yang dipakai padaalgoritma k-Means adalah Euclidean distance (d)

• x = x1, x2, . . . , xn, dan y = y1, y2, . . . , yn merupakan banyaknya natribut(kolom) antara 2 record

4. Hitung kembali pusat klaster dengan keanggotaan klaster yangsekarang. Pusat klaster adalah rata-rata (mean) dari semua dataatau objek dalam klaster tertentu

5. Tugaskan lagi setiap objek dengan memakai pusat klaster yangbaru. Jika pusat klaster sudah tidak berubah lagi, maka prosespengklasteran selesai. Atau, kembali lagi ke langkah nomor 3sampai pusat klaster tidak berubah lagi (stabil) atau tidak adapenurunan yang signifikan dari nilai SSE (Sum of Squared Errors)

Tahapan Algoritma k-Means

1. Pilih jumlah klaster k yang diinginkan2. Inisialisasi k pusat klaster (centroid) secara random3. Tempatkan setiap data atau objek ke klaster terdekat. Kedekatan

dua objek ditentukan berdasar jarak. Jarak yang dipakai padaalgoritma k-Means adalah Euclidean distance (d)

• x = x1, x2, . . . , xn, dan y = y1, y2, . . . , yn merupakan banyaknya natribut(kolom) antara 2 record

4. Hitung kembali pusat klaster dengan keanggotaan klaster yangsekarang. Pusat klaster adalah rata-rata (mean) dari semua dataatau objek dalam klaster tertentu

5. Tugaskan lagi setiap objek dengan memakai pusat klaster yangbaru. Jika pusat klaster sudah tidak berubah lagi, maka prosespengklasteran selesai. Atau, kembali lagi ke langkah nomor 3sampai pusat klaster tidak berubah lagi (stabil) atau tidak adapenurunan yang signifikan dari nilai SSE (Sum of Squared Errors)

n

iiiEuclidean yxyxd

1

2,

1. Pilih jumlah klaster k yang diinginkan2. Inisialisasi k pusat klaster (centroid) secara random3. Tempatkan setiap data atau objek ke klaster terdekat. Kedekatan

dua objek ditentukan berdasar jarak. Jarak yang dipakai padaalgoritma k-Means adalah Euclidean distance (d)

• x = x1, x2, . . . , xn, dan y = y1, y2, . . . , yn merupakan banyaknya natribut(kolom) antara 2 record

4. Hitung kembali pusat klaster dengan keanggotaan klaster yangsekarang. Pusat klaster adalah rata-rata (mean) dari semua dataatau objek dalam klaster tertentu

5. Tugaskan lagi setiap objek dengan memakai pusat klaster yangbaru. Jika pusat klaster sudah tidak berubah lagi, maka prosespengklasteran selesai. Atau, kembali lagi ke langkah nomor 3sampai pusat klaster tidak berubah lagi (stabil) atau tidak adapenurunan yang signifikan dari nilai SSE (Sum of Squared Errors)

19

Page 20: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

1. Tentukan jumlah klaster k=22. Tentukan centroid awal secara acak

misal dari data disamping m1 =(1,1),m2=(2,1)

3. Tempatkan tiap objek ke klasterterdekat berdasarkan nilai centroidyang paling dekat selisihnya(jaraknya). Didapatkan hasil, anggotacluster1 = {A,E,G}, cluster2={B,C,D,F,H}Nilai SSE yaitu:

Contoh Kasus – Iterasi 1

1. Tentukan jumlah klaster k=22. Tentukan centroid awal secara acak

misal dari data disamping m1 =(1,1),m2=(2,1)

3. Tempatkan tiap objek ke klasterterdekat berdasarkan nilai centroidyang paling dekat selisihnya(jaraknya). Didapatkan hasil, anggotacluster1 = {A,E,G}, cluster2={B,C,D,F,H}Nilai SSE yaitu:

1. Tentukan jumlah klaster k=22. Tentukan centroid awal secara acak

misal dari data disamping m1 =(1,1),m2=(2,1)

3. Tempatkan tiap objek ke klasterterdekat berdasarkan nilai centroidyang paling dekat selisihnya(jaraknya). Didapatkan hasil, anggotacluster1 = {A,E,G}, cluster2={B,C,D,F,H}Nilai SSE yaitu:

20

2

1

,

k

i Cpi

i

mpdSSE

Page 21: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

4. Menghitung nilai centroid yang baru

5. Tugaskan lagi setiap objek denganmemakai pusat klaster yang baru.Nilai SSE yang baru:

Interasi 2

2,13/123,3/1111 m

4. Menghitung nilai centroid yang baru

5. Tugaskan lagi setiap objek denganmemakai pusat klaster yang baru.Nilai SSE yang baru:

2,13/123,3/1111 m

4,2;6,35/12333,5/245432 m

4. Menghitung nilai centroid yang baru

5. Tugaskan lagi setiap objek denganmemakai pusat klaster yang baru.Nilai SSE yang baru:

21

Page 22: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

4. Terdapat perubahan anggotacluster yaitu cluster1={A,E,G,H},cluster2={B,C,D,F}, maka cari laginilai centroid yang baru yaitu:m1=(1,25;1,75) dan m2=(4;2,75)

5. Tugaskan lagi setiap objekdengan memakai pusat klasteryang baruNilai SSE yang baru:

Iterasi 3

4. Terdapat perubahan anggotacluster yaitu cluster1={A,E,G,H},cluster2={B,C,D,F}, maka cari laginilai centroid yang baru yaitu:m1=(1,25;1,75) dan m2=(4;2,75)

5. Tugaskan lagi setiap objekdengan memakai pusat klasteryang baruNilai SSE yang baru:

22

Page 23: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Dapat dilihat pada tabel.Tidak ada perubahan anggotalagi pada masing-masingcluster

• Hasil akhir yaitu:cluster1={A,E,G,H}, dancluster2={B,C,D,F}Dengan nilai SSE = 6,25 danjumlah iterasi 3

Hasil Akhir

• Dapat dilihat pada tabel.Tidak ada perubahan anggotalagi pada masing-masingcluster

• Hasil akhir yaitu:cluster1={A,E,G,H}, dancluster2={B,C,D,F}Dengan nilai SSE = 6,25 danjumlah iterasi 3

• Dapat dilihat pada tabel.Tidak ada perubahan anggotalagi pada masing-masingcluster

• Hasil akhir yaitu:cluster1={A,E,G,H}, dancluster2={B,C,D,F}Dengan nilai SSE = 6,25 danjumlah iterasi 3

23

Page 24: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Lakukan eksperimen mengikuti bukuMatthew North, Data Mining for the Masses,2012, Chapter 6 k-Means Clustering, pp. 91-103 (CoronaryHeartDisease.csv)

• Analisis apa yang telah dilakukan oleh Sonia,dan apa manfaat k-Means clustering bagipekerjaannya?

Latihan

• Lakukan eksperimen mengikuti bukuMatthew North, Data Mining for the Masses,2012, Chapter 6 k-Means Clustering, pp. 91-103 (CoronaryHeartDisease.csv)

• Analisis apa yang telah dilakukan oleh Sonia,dan apa manfaat k-Means clustering bagipekerjaannya?

• Lakukan eksperimen mengikuti bukuMatthew North, Data Mining for the Masses,2012, Chapter 6 k-Means Clustering, pp. 91-103 (CoronaryHeartDisease.csv)

• Analisis apa yang telah dilakukan oleh Sonia,dan apa manfaat k-Means clustering bagipekerjaannya?

24

Page 25: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Lakukan klastering terhadap dataIMFdata.csv ()

Latihan

• Lakukan klastering terhadap dataIMFdata.csv ()

25

Page 26: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Strength:• Efficient: O(tkn), where n is # objects, k is # clusters, and t is #

iterations. Normally, k, t << n.• Comparing: PAM: O(k(n-k)2 ), CLARA: O(ks2 + k(n-k))

• Comment: Often terminates at a local optimal

• Weakness• Applicable only to objects in a continuous n-dimensional space

• Using the k-modes method for categorical data• In comparison, k-medoids can be applied to a wide range of data

• Need to specify k, the number of clusters, in advance (there are ways toautomatically determine the best k (see Hastie et al., 2009)

• Sensitive to noisy data and outliers• Not suitable to discover clusters with non-convex shapes

Comments on the K-MeansMethod

• Strength:• Efficient: O(tkn), where n is # objects, k is # clusters, and t is #

iterations. Normally, k, t << n.• Comparing: PAM: O(k(n-k)2 ), CLARA: O(ks2 + k(n-k))

• Comment: Often terminates at a local optimal

• Weakness• Applicable only to objects in a continuous n-dimensional space

• Using the k-modes method for categorical data• In comparison, k-medoids can be applied to a wide range of data

• Need to specify k, the number of clusters, in advance (there are ways toautomatically determine the best k (see Hastie et al., 2009)

• Sensitive to noisy data and outliers• Not suitable to discover clusters with non-convex shapes

• Strength:• Efficient: O(tkn), where n is # objects, k is # clusters, and t is #

iterations. Normally, k, t << n.• Comparing: PAM: O(k(n-k)2 ), CLARA: O(ks2 + k(n-k))

• Comment: Often terminates at a local optimal

• Weakness• Applicable only to objects in a continuous n-dimensional space

• Using the k-modes method for categorical data• In comparison, k-medoids can be applied to a wide range of data

• Need to specify k, the number of clusters, in advance (there are ways toautomatically determine the best k (see Hastie et al., 2009)

• Sensitive to noisy data and outliers• Not suitable to discover clusters with non-convex shapes

26

Page 27: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Most of the variants of the k-means which differ in• Selection of the initial k means• Dissimilarity calculations• Strategies to calculate cluster means

• Handling categorical data: k-modes• Replacing means of clusters with modes• Using new dissimilarity measures to deal with

categorical objects• Using a frequency-based method to update modes of

clusters• A mixture of categorical and numerical data: k-prototype

method

Variations of the K-MeansMethod

• Most of the variants of the k-means which differ in• Selection of the initial k means• Dissimilarity calculations• Strategies to calculate cluster means

• Handling categorical data: k-modes• Replacing means of clusters with modes• Using new dissimilarity measures to deal with

categorical objects• Using a frequency-based method to update modes of

clusters• A mixture of categorical and numerical data: k-prototype

method

• Most of the variants of the k-means which differ in• Selection of the initial k means• Dissimilarity calculations• Strategies to calculate cluster means

• Handling categorical data: k-modes• Replacing means of clusters with modes• Using new dissimilarity measures to deal with

categorical objects• Using a frequency-based method to update modes of

clusters• A mixture of categorical and numerical data: k-prototype

method27

Page 28: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• The k-means algorithm is sensitive to outliers!• Since an object with an extremely large value may substantially

distort the distribution of the data

• K-Medoids:• Instead of taking the mean value of the object in a cluster as a

reference point, medoids can be used, which is the most centrallylocated object in a cluster

What Is the Problem of the K-Means Method?

• The k-means algorithm is sensitive to outliers!• Since an object with an extremely large value may substantially

distort the distribution of the data

• K-Medoids:• Instead of taking the mean value of the object in a cluster as a

reference point, medoids can be used, which is the most centrallylocated object in a cluster

8

9

10

8

9

10

28

0

1

2

3

4

5

6

7

8

0 1 2 3 4 5 6 7 8 9 100

1

2

3

4

5

6

7

8

0 1 2 3 4 5 6 7 8 9 10

Page 29: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

PAM: A Typical K-Medoids Algorithm

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

Total Cost = 20

8

9

10

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 100

1

2

3

4

5

6

7

8

0 1 2 3 4 5 6 7 8 9 10

K=2

Arbitrarychoose kobject asinitialmedoids

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

Assigneachremaining objecttonearestmedoids

Randomly select anonmedoid object,OramdomTotal Cost = 26

29

Computetotal cost ofswapping

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

Swapping Oand Oramdom

If quality isimproved.

Do loop

Until no change

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

Page 30: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• K-Medoids Clustering: Find representative objects(medoids) in clusters

• PAM (Partitioning Around Medoids, Kaufmann &Rousseeuw 1987)

• Starts from an initial set of medoids and iterativelyreplaces one of the medoids by one of the non-medoidsif it improves the total distance of the resultingclustering

• PAM works effectively for small data sets, but does notscale well for large data sets (due to the computationalcomplexity)

• Efficiency improvement on PAM• CLARA (Kaufmann & Rousseeuw, 1990): PAM on samples• CLARANS (Ng & Han, 1994): Randomized re-sampling

The K-Medoid Clustering Method

• K-Medoids Clustering: Find representative objects(medoids) in clusters

• PAM (Partitioning Around Medoids, Kaufmann &Rousseeuw 1987)

• Starts from an initial set of medoids and iterativelyreplaces one of the medoids by one of the non-medoidsif it improves the total distance of the resultingclustering

• PAM works effectively for small data sets, but does notscale well for large data sets (due to the computationalcomplexity)

• Efficiency improvement on PAM• CLARA (Kaufmann & Rousseeuw, 1990): PAM on samples• CLARANS (Ng & Han, 1994): Randomized re-sampling

• K-Medoids Clustering: Find representative objects(medoids) in clusters

• PAM (Partitioning Around Medoids, Kaufmann &Rousseeuw 1987)

• Starts from an initial set of medoids and iterativelyreplaces one of the medoids by one of the non-medoidsif it improves the total distance of the resultingclustering

• PAM works effectively for small data sets, but does notscale well for large data sets (due to the computationalcomplexity)

• Efficiency improvement on PAM• CLARA (Kaufmann & Rousseeuw, 1990): PAM on samples• CLARANS (Ng & Han, 1994): Randomized re-sampling

30

Page 31: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

5.3 Hierarchical Methods

31

Page 32: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Use distance matrix as clustering criteria• This method does not require the number of clusters k as an

input, but needs a termination condition

Hierarchical Clustering

• Use distance matrix as clustering criteria• This method does not require the number of clusters k as an

input, but needs a termination condition

Step 0 Step 1 Step 2 Step 3 Step 4

b

c

aa b

a b c d e

agglomerative(AGNES)

32

d

c

ed e

c d e

Step 4 Step 3 Step 2 Step 1 Step 0

divisive(DIANA)

Page 33: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Introduced in Kaufmann and Rousseeuw (1990)• Implemented in statistical packages, e.g., Splus• Use the single-link method and the dissimilarity matrix• Merge nodes that have the least dissimilarity• Go on in a non-descending fashion• Eventually all nodes belong to the same cluster

AGNES (Agglomerative Nesting)

• Introduced in Kaufmann and Rousseeuw (1990)• Implemented in statistical packages, e.g., Splus• Use the single-link method and the dissimilarity matrix• Merge nodes that have the least dissimilarity• Go on in a non-descending fashion• Eventually all nodes belong to the same cluster

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

• Introduced in Kaufmann and Rousseeuw (1990)• Implemented in statistical packages, e.g., Splus• Use the single-link method and the dissimilarity matrix• Merge nodes that have the least dissimilarity• Go on in a non-descending fashion• Eventually all nodes belong to the same cluster

33

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

Page 34: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

Dendrogram: Shows How Clusters are Merged

Decompose data objects into a several levels of nested partitioning (tree ofclusters), called a dendrogram

A clustering of the data objects is obtained by cutting the dendrogram at thedesired level, then each connected component forms a cluster

Decompose data objects into a several levels of nested partitioning (tree ofclusters), called a dendrogram

A clustering of the data objects is obtained by cutting the dendrogram at thedesired level, then each connected component forms a cluster

34

Page 35: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Introduced in Kaufmann and Rousseeuw (1990)• Implemented in statistical analysis packages, e.g.,

Splus• Inverse order of AGNES• Eventually each node forms a cluster on its own

DIANA (Divisive Analysis)

• Introduced in Kaufmann and Rousseeuw (1990)• Implemented in statistical analysis packages, e.g.,

Splus• Inverse order of AGNES• Eventually each node forms a cluster on its own

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 100

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

35

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 100

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

Page 36: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Single link: smallest distance between an element in one cluster and anelement in the other, i.e., dist(Ki, Kj) = min(tip, tjq)

• Complete link: largest distance between an element in one cluster and anelement in the other, i.e., dist(Ki, Kj) = max(tip, tjq)

• Average: avg distance between an element in one cluster and an elementin the other, i.e., dist(Ki, Kj) = avg(tip, tjq)

• Centroid: distance between the centroids of two clusters, i.e., dist(Ki, Kj) =dist(Ci, Cj)

• Medoid: distance between the medoids of two clusters, i.e., dist(Ki, Kj) =dist(Mi, Mj)

• Medoid: a chosen, centrally located object in the cluster

Distance between Clusters X X

• Single link: smallest distance between an element in one cluster and anelement in the other, i.e., dist(Ki, Kj) = min(tip, tjq)

• Complete link: largest distance between an element in one cluster and anelement in the other, i.e., dist(Ki, Kj) = max(tip, tjq)

• Average: avg distance between an element in one cluster and an elementin the other, i.e., dist(Ki, Kj) = avg(tip, tjq)

• Centroid: distance between the centroids of two clusters, i.e., dist(Ki, Kj) =dist(Ci, Cj)

• Medoid: distance between the medoids of two clusters, i.e., dist(Ki, Kj) =dist(Mi, Mj)

• Medoid: a chosen, centrally located object in the cluster

• Single link: smallest distance between an element in one cluster and anelement in the other, i.e., dist(Ki, Kj) = min(tip, tjq)

• Complete link: largest distance between an element in one cluster and anelement in the other, i.e., dist(Ki, Kj) = max(tip, tjq)

• Average: avg distance between an element in one cluster and an elementin the other, i.e., dist(Ki, Kj) = avg(tip, tjq)

• Centroid: distance between the centroids of two clusters, i.e., dist(Ki, Kj) =dist(Ci, Cj)

• Medoid: distance between the medoids of two clusters, i.e., dist(Ki, Kj) =dist(Mi, Mj)

• Medoid: a chosen, centrally located object in the cluster

36

Page 37: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Centroid: the “middle” of acluster

• Radius: square root of averagedistance from any point of thecluster to its centroid

• Diameter: square root ofaverage mean squared distancebetween all pairs of points in thecluster

Centroid, Radius and Diameter of a Cluster(for numerical data sets)

N

tNi ip

mC)(

1• Centroid: the “middle” of acluster

• Radius: square root of averagedistance from any point of thecluster to its centroid

• Diameter: square root ofaverage mean squared distancebetween all pairs of points in thecluster

N

tNi ip

mC)(

1

N

mcip

tNi

mR

2)(1

• Centroid: the “middle” of acluster

• Radius: square root of averagedistance from any point of thecluster to its centroid

• Diameter: square root ofaverage mean squared distancebetween all pairs of points in thecluster

37

)1(

2)(11

NNiq

tip

tNi

Ni

mD

Page 38: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Major weakness of agglomerative clustering methods

• Can never undo what was done previously

• Do not scale well: time complexity of at least O(n2),

where n is the number of total objects

• Integration of hierarchical & distance-based clustering

• BIRCH (1996): uses CF-tree and incrementally adjusts the

quality of sub-clusters

• CHAMELEON (1999): hierarchical clustering using

dynamic modeling

Extensions to Hierarchical Clustering

• Major weakness of agglomerative clustering methods

• Can never undo what was done previously

• Do not scale well: time complexity of at least O(n2),

where n is the number of total objects

• Integration of hierarchical & distance-based clustering

• BIRCH (1996): uses CF-tree and incrementally adjusts the

quality of sub-clusters

• CHAMELEON (1999): hierarchical clustering using

dynamic modeling

• Major weakness of agglomerative clustering methods

• Can never undo what was done previously

• Do not scale well: time complexity of at least O(n2),

where n is the number of total objects

• Integration of hierarchical & distance-based clustering

• BIRCH (1996): uses CF-tree and incrementally adjusts the

quality of sub-clusters

• CHAMELEON (1999): hierarchical clustering using

dynamic modeling

38

Page 39: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Zhang, Ramakrishnan & Livny, SIGMOD’96

• Incrementally construct a CF (Clustering Feature) tree, a hierarchicaldata structure for multiphase clustering

• Phase 1: scan DB to build an initial in-memory CF tree (a multi-levelcompression of the data that tries to preserve the inherentclustering structure of the data)

• Phase 2: use an arbitrary clustering algorithm to cluster the leafnodes of the CF-tree

• Scales linearly: finds a good clustering with a single scan and improvesthe quality with a few additional scans

• Weakness: handles only numeric data, and sensitive to the order of thedata record

BIRCH (Balanced Iterative Reducing andClustering Using Hierarchies)• Zhang, Ramakrishnan & Livny, SIGMOD’96

• Incrementally construct a CF (Clustering Feature) tree, a hierarchicaldata structure for multiphase clustering

• Phase 1: scan DB to build an initial in-memory CF tree (a multi-levelcompression of the data that tries to preserve the inherentclustering structure of the data)

• Phase 2: use an arbitrary clustering algorithm to cluster the leafnodes of the CF-tree

• Scales linearly: finds a good clustering with a single scan and improvesthe quality with a few additional scans

• Weakness: handles only numeric data, and sensitive to the order of thedata record

• Zhang, Ramakrishnan & Livny, SIGMOD’96

• Incrementally construct a CF (Clustering Feature) tree, a hierarchicaldata structure for multiphase clustering

• Phase 1: scan DB to build an initial in-memory CF tree (a multi-levelcompression of the data that tries to preserve the inherentclustering structure of the data)

• Phase 2: use an arbitrary clustering algorithm to cluster the leafnodes of the CF-tree

• Scales linearly: finds a good clustering with a single scan and improvesthe quality with a few additional scans

• Weakness: handles only numeric data, and sensitive to the order of thedata record

39

Page 40: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Clustering Feature (CF): CF = (N, LS, SS)• N: Number of data points• LS: linear sum of N points:

• SS: square sum of N points

Clustering Feature Vector in BIRCH

• Clustering Feature (CF): CF = (N, LS, SS)• N: Number of data points• LS: linear sum of N points:

• SS: square sum of N points

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

CF = (5, (16,30),(54,190))

(3,4)(2,6)(4,5)(4,7)(3,8)

N

iiX

1

2

1

N

iiX

40

0

1

2

3

4

5

6

7

8

9

10

0 1 2 3 4 5 6 7 8 9 10

(3,4)(2,6)(4,5)(4,7)(3,8)

2

1

N

iiX

Page 41: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Clustering feature:• Summary of the statistics for a given subcluster: the 0-

th, 1st, and 2nd moments of the subcluster from thestatistical point of view

• Registers crucial measurements for computing clusterand utilizes storage efficiently

• A CF tree is a height-balanced tree that stores theclustering features for a hierarchical clustering

• A nonleaf node in a tree has descendants or “children”• The nonleaf nodes store sums of the CFs of their

children• A CF tree has two parameters

• Branching factor: max # of children• Threshold: max diameter of sub-clusters stored at the

leaf nodes

CF-Tree in BIRCH

• Clustering feature:• Summary of the statistics for a given subcluster: the 0-

th, 1st, and 2nd moments of the subcluster from thestatistical point of view

• Registers crucial measurements for computing clusterand utilizes storage efficiently

• A CF tree is a height-balanced tree that stores theclustering features for a hierarchical clustering

• A nonleaf node in a tree has descendants or “children”• The nonleaf nodes store sums of the CFs of their

children• A CF tree has two parameters

• Branching factor: max # of children• Threshold: max diameter of sub-clusters stored at the

leaf nodes

• Clustering feature:• Summary of the statistics for a given subcluster: the 0-

th, 1st, and 2nd moments of the subcluster from thestatistical point of view

• Registers crucial measurements for computing clusterand utilizes storage efficiently

• A CF tree is a height-balanced tree that stores theclustering features for a hierarchical clustering

• A nonleaf node in a tree has descendants or “children”• The nonleaf nodes store sums of the CFs of their

children• A CF tree has two parameters

• Branching factor: max # of children• Threshold: max diameter of sub-clusters stored at the

leaf nodes41

Page 42: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

The CF Tree Structure

CF1

child1

CF3

child3

CF2

child2

CF6

child6

B = 7

L = 6

CF1

child1

CF3

child3

CF2

child2

CF5

child5

Non-leaf node

Leaf node Leaf node

42

CF1 CF2 CF6prev next CF1 CF2 CF4

prev next

Leaf node Leaf node

Page 43: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Cluster Diameter

• For each point in the input• Find closest leaf entry• Add point to leaf entry and update CF• If entry diameter > max_diameter, then split leaf, and

possibly parents• Algorithm is O(n)• Concerns

• Sensitive to insertion order of data points• Since we fix the size of leaf nodes, so clusters may not be so

natural• Clusters tend to be spherical given the radius and diameter

measures

The Birch Algorithm

2)()1(

1j

xi

xnn

• Cluster Diameter

• For each point in the input• Find closest leaf entry• Add point to leaf entry and update CF• If entry diameter > max_diameter, then split leaf, and

possibly parents• Algorithm is O(n)• Concerns

• Sensitive to insertion order of data points• Since we fix the size of leaf nodes, so clusters may not be so

natural• Clusters tend to be spherical given the radius and diameter

measures

• Cluster Diameter

• For each point in the input• Find closest leaf entry• Add point to leaf entry and update CF• If entry diameter > max_diameter, then split leaf, and

possibly parents• Algorithm is O(n)• Concerns

• Sensitive to insertion order of data points• Since we fix the size of leaf nodes, so clusters may not be so

natural• Clusters tend to be spherical given the radius and diameter

measures43

Page 44: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• CHAMELEON: G. Karypis, E. H. Han, and V. Kumar, 1999

• Measures the similarity based on a dynamic model• Two clusters are merged only if the interconnectivity

and closeness (proximity) between two clusters arehigh relative to the internal interconnectivity of theclusters and closeness of items within the clusters

• Graph-based, and a two-phase algorithm1. Use a graph-partitioning algorithm: cluster objects into

a large number of relatively small sub-clusters2. Use an agglomerative hierarchical clustering algorithm:

find the genuine clusters by repeatedly combiningthese sub-clusters

CHAMELEON: Hierarchical Clustering UsingDynamic Modeling (1999)• CHAMELEON: G. Karypis, E. H. Han, and V. Kumar, 1999

• Measures the similarity based on a dynamic model• Two clusters are merged only if the interconnectivity

and closeness (proximity) between two clusters arehigh relative to the internal interconnectivity of theclusters and closeness of items within the clusters

• Graph-based, and a two-phase algorithm1. Use a graph-partitioning algorithm: cluster objects into

a large number of relatively small sub-clusters2. Use an agglomerative hierarchical clustering algorithm:

find the genuine clusters by repeatedly combiningthese sub-clusters

• CHAMELEON: G. Karypis, E. H. Han, and V. Kumar, 1999

• Measures the similarity based on a dynamic model• Two clusters are merged only if the interconnectivity

and closeness (proximity) between two clusters arehigh relative to the internal interconnectivity of theclusters and closeness of items within the clusters

• Graph-based, and a two-phase algorithm1. Use a graph-partitioning algorithm: cluster objects into

a large number of relatively small sub-clusters2. Use an agglomerative hierarchical clustering algorithm:

find the genuine clusters by repeatedly combiningthese sub-clusters

44

Page 45: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• k-nearest graphs from an original data in 2D:

• EC{Ci ,Cj } :The absolute inter-connectivity between Ci and Cj:the sum of the weight of the edges that connect vertices inCi to vertices in Cj

• Internal inter-connectivity of a cluster Ci : the size of its min-cut bisector ECCi (i.e., the weighted sum of edges thatpartition the graph into two roughly equal parts)

• Relative Inter-connectivity (RI):

KNN Graphs & Interconnectivity• k-nearest graphs from an original data in 2D:

• EC{Ci ,Cj } :The absolute inter-connectivity between Ci and Cj:the sum of the weight of the edges that connect vertices inCi to vertices in Cj

• Internal inter-connectivity of a cluster Ci : the size of its min-cut bisector ECCi (i.e., the weighted sum of edges thatpartition the graph into two roughly equal parts)

• Relative Inter-connectivity (RI):

• k-nearest graphs from an original data in 2D:

• EC{Ci ,Cj } :The absolute inter-connectivity between Ci and Cj:the sum of the weight of the edges that connect vertices inCi to vertices in Cj

• Internal inter-connectivity of a cluster Ci : the size of its min-cut bisector ECCi (i.e., the weighted sum of edges thatpartition the graph into two roughly equal parts)

• Relative Inter-connectivity (RI):

45

Page 46: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Relative closeness between a pair of clusters Ci and Cj :the absolute closeness between Ci and Cj normalizedw.r.t. the internal closeness of the two clusters Ci and Cj

• and are the average weights of the edgesthat belong in the min-cut bisector of clusters Ci and Cj, respectively, and is the average weight of theedges that connect vertices in Ci to vertices in Cj

• Merge Sub-Clusters:• Merges only those pairs of clusters whose RI and RC are both

above some user-specified thresholds• Merge those maximizing the function that combines RI and

RC

Relative Closeness & Merge of Sub-Clusters

• Relative closeness between a pair of clusters Ci and Cj :the absolute closeness between Ci and Cj normalizedw.r.t. the internal closeness of the two clusters Ci and Cj

• and are the average weights of the edgesthat belong in the min-cut bisector of clusters Ci and Cj, respectively, and is the average weight of theedges that connect vertices in Ci to vertices in Cj

• Merge Sub-Clusters:• Merges only those pairs of clusters whose RI and RC are both

above some user-specified thresholds• Merge those maximizing the function that combines RI and

RC

• Relative closeness between a pair of clusters Ci and Cj :the absolute closeness between Ci and Cj normalizedw.r.t. the internal closeness of the two clusters Ci and Cj

• and are the average weights of the edgesthat belong in the min-cut bisector of clusters Ci and Cj, respectively, and is the average weight of theedges that connect vertices in Ci to vertices in Cj

• Merge Sub-Clusters:• Merges only those pairs of clusters whose RI and RC are both

above some user-specified thresholds• Merge those maximizing the function that combines RI and

RC46

Page 47: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

Overall Framework of CHAMELEONConstruct (K-NN)

Sparse Graph Partition the Graph

Merge Partition

Data Set

K-NN Graph

P and q are connected ifq is among the top kclosest neighbors of p

47

Final Clusters

K-NN Graph

P and q are connected ifq is among the top kclosest neighbors of p

Relative interconnectivity:connectivity of c1 and c2 overinternal connectivity

Relative closeness: closenessof c1 and c2 over internalcloseness

Page 48: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

CHAMELEON (Clustering Complex Objects)

48

Page 49: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Algorithmic hierarchical clustering• Nontrivial to choose a good distance measure• Hard to handle missing attribute values• Optimization goal not clear: heuristic, local search

• Probabilistic hierarchical clustering• Use probabilistic models to measure distances between

clusters• Generative model: Regard the set of data objects to be

clustered as a sample of the underlying data generationmechanism to be analyzed

• Easy to understand, same efficiency as algorithmicagglomerative clustering method, can handle partiallyobserved data

• In practice, assume the generative models adoptcommon distributions functions, e.g., Gaussiandistribution or Bernoulli distribution, governed byparameters

Probabilistic Hierarchical Clustering• Algorithmic hierarchical clustering

• Nontrivial to choose a good distance measure• Hard to handle missing attribute values• Optimization goal not clear: heuristic, local search

• Probabilistic hierarchical clustering• Use probabilistic models to measure distances between

clusters• Generative model: Regard the set of data objects to be

clustered as a sample of the underlying data generationmechanism to be analyzed

• Easy to understand, same efficiency as algorithmicagglomerative clustering method, can handle partiallyobserved data

• In practice, assume the generative models adoptcommon distributions functions, e.g., Gaussiandistribution or Bernoulli distribution, governed byparameters

• Algorithmic hierarchical clustering• Nontrivial to choose a good distance measure• Hard to handle missing attribute values• Optimization goal not clear: heuristic, local search

• Probabilistic hierarchical clustering• Use probabilistic models to measure distances between

clusters• Generative model: Regard the set of data objects to be

clustered as a sample of the underlying data generationmechanism to be analyzed

• Easy to understand, same efficiency as algorithmicagglomerative clustering method, can handle partiallyobserved data

• In practice, assume the generative models adoptcommon distributions functions, e.g., Gaussiandistribution or Bernoulli distribution, governed byparameters

49

Page 50: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Given a set of 1-D points X = {x1, …, xn} for clusteringanalysis & assuming they are generated by a Gaussiandistribution:

• The probability that a point xi ∈ X is generated by themodel

• The likelihood that X is generated by the model:

• The task of learning the generative model: find theparameters μ and σ2 such that

Generative Model

• Given a set of 1-D points X = {x1, …, xn} for clusteringanalysis & assuming they are generated by a Gaussiandistribution:

• The probability that a point xi ∈ X is generated by themodel

• The likelihood that X is generated by the model:

• The task of learning the generative model: find theparameters μ and σ2 such that

• Given a set of 1-D points X = {x1, …, xn} for clusteringanalysis & assuming they are generated by a Gaussiandistribution:

• The probability that a point xi ∈ X is generated by themodel

• The likelihood that X is generated by the model:

• The task of learning the generative model: find theparameters μ and σ2 such that

50

the maximum likelihood

Page 51: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

Gaussian Distribution

Bean machine:drop ball withpins

Bean machine:drop ball withpins

51From wikipedia and http://home.dei.polimi.it

1-dGaussian

2-dGaussian

Page 52: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• For a set of objects partitioned into m clusters C1, . . . ,Cm, the qualitycan be measured by,

where P() is the maximum likelihood• If we merge two clusters Cj1 and Cj2 into a cluster Cj1∪Cj2, then, the

change in quality of the overall clustering is

• Distance between clusters C1 and C2:

A Probabilistic Hierarchical Clustering Algorithm

• For a set of objects partitioned into m clusters C1, . . . ,Cm, the qualitycan be measured by,

where P() is the maximum likelihood• If we merge two clusters Cj1 and Cj2 into a cluster Cj1∪Cj2, then, the

change in quality of the overall clustering is

• Distance between clusters C1 and C2:

• For a set of objects partitioned into m clusters C1, . . . ,Cm, the qualitycan be measured by,

where P() is the maximum likelihood• If we merge two clusters Cj1 and Cj2 into a cluster Cj1∪Cj2, then, the

change in quality of the overall clustering is

• Distance between clusters C1 and C2:

52

Page 53: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

5.4 Density-Based Methods

53

Page 54: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Clustering based on density (local cluster criterion), such asdensity-connected points

• Major features:• Discover clusters of arbitrary shape• Handle noise• One scan• Need density parameters as termination condition

• Several interesting studies:• DBSCAN: Ester, et al. (KDD’96)• OPTICS: Ankerst, et al (SIGMOD’99).• DENCLUE: Hinneburg & D. Keim (KDD’98)• CLIQUE: Agrawal, et al. (SIGMOD’98) (more grid-based)

Density-Based Clustering Methods

• Clustering based on density (local cluster criterion), such asdensity-connected points

• Major features:• Discover clusters of arbitrary shape• Handle noise• One scan• Need density parameters as termination condition

• Several interesting studies:• DBSCAN: Ester, et al. (KDD’96)• OPTICS: Ankerst, et al (SIGMOD’99).• DENCLUE: Hinneburg & D. Keim (KDD’98)• CLIQUE: Agrawal, et al. (SIGMOD’98) (more grid-based)

• Clustering based on density (local cluster criterion), such asdensity-connected points

• Major features:• Discover clusters of arbitrary shape• Handle noise• One scan• Need density parameters as termination condition

• Several interesting studies:• DBSCAN: Ester, et al. (KDD’96)• OPTICS: Ankerst, et al (SIGMOD’99).• DENCLUE: Hinneburg & D. Keim (KDD’98)• CLIQUE: Agrawal, et al. (SIGMOD’98) (more grid-based)

54

Page 55: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Two parameters:

• Eps: Maximum radius of the neighbourhood

• MinPts: Minimum number of points in an Eps-neighbourhood of that point

• NEps(q): {p belongs to D | dist(p,q) ≤ Eps}

• Directly density-reachable: A point p is directly density-reachable from a point q w.r.t. Eps, MinPts if

• p belongs to NEps(q)

• core point condition:

|NEps (q)| ≥ MinPts

Density-Based Clustering: Basic Concepts

• Two parameters:

• Eps: Maximum radius of the neighbourhood

• MinPts: Minimum number of points in an Eps-neighbourhood of that point

• NEps(q): {p belongs to D | dist(p,q) ≤ Eps}

• Directly density-reachable: A point p is directly density-reachable from a point q w.r.t. Eps, MinPts if

• p belongs to NEps(q)

• core point condition:

|NEps (q)| ≥ MinPts

• Two parameters:

• Eps: Maximum radius of the neighbourhood

• MinPts: Minimum number of points in an Eps-neighbourhood of that point

• NEps(q): {p belongs to D | dist(p,q) ≤ Eps}

• Directly density-reachable: A point p is directly density-reachable from a point q w.r.t. Eps, MinPts if

• p belongs to NEps(q)

• core point condition:

|NEps (q)| ≥ MinPts

55

MinPts = 5

Eps = 1 cm

p

q

Page 56: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Density-reachable:

• A point p is density-reachable from apoint q w.r.t. Eps, MinPts if there is achain of points p1, …, pn, p1 = q, pn =p such that pi+1 is directly density-reachable from pi

• Density-connected

• A point p is density-connected to apoint q w.r.t. Eps, MinPts if there is apoint o such that both, p and q aredensity-reachable from o w.r.t. Epsand MinPts

Density-Reachable and Density-Connected

p

• Density-reachable:

• A point p is density-reachable from apoint q w.r.t. Eps, MinPts if there is achain of points p1, …, pn, p1 = q, pn =p such that pi+1 is directly density-reachable from pi

• Density-connected

• A point p is density-connected to apoint q w.r.t. Eps, MinPts if there is apoint o such that both, p and q aredensity-reachable from o w.r.t. Epsand MinPts

p

qp1

p q

• Density-reachable:

• A point p is density-reachable from apoint q w.r.t. Eps, MinPts if there is achain of points p1, …, pn, p1 = q, pn =p such that pi+1 is directly density-reachable from pi

• Density-connected

• A point p is density-connected to apoint q w.r.t. Eps, MinPts if there is apoint o such that both, p and q aredensity-reachable from o w.r.t. Epsand MinPts

56

p q

o

Page 57: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Relies on a density-based notion of cluster: Acluster is defined as a maximal set of density-connected points

• Discovers clusters of arbitrary shape in spatialdatabases with noise

DBSCAN: Density-Based Spatial Clustering ofApplications with Noise

• Relies on a density-based notion of cluster: Acluster is defined as a maximal set of density-connected points

• Discovers clusters of arbitrary shape in spatialdatabases with noise

Outlier

57

Core

BorderEps = 1cm

MinPts = 5

Page 58: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

1. Arbitrary select a point p

2. Retrieve all points density-reachable from p w.r.t. Eps andMinPts

3. If p is a core point, a cluster is formed

4. If p is a border point, no points are density-reachablefrom p and DBSCAN visits the next point of the database

5. Continue the process until all of the points have beenprocessed

If a spatial index is used, the computational complexity of DBSCAN isO(nlogn), where n is the number of database objects. Otherwise, thecomplexity is O(n2)

DBSCAN: The Algorithm

1. Arbitrary select a point p

2. Retrieve all points density-reachable from p w.r.t. Eps andMinPts

3. If p is a core point, a cluster is formed

4. If p is a border point, no points are density-reachablefrom p and DBSCAN visits the next point of the database

5. Continue the process until all of the points have beenprocessed

If a spatial index is used, the computational complexity of DBSCAN isO(nlogn), where n is the number of database objects. Otherwise, thecomplexity is O(n2)

1. Arbitrary select a point p

2. Retrieve all points density-reachable from p w.r.t. Eps andMinPts

3. If p is a core point, a cluster is formed

4. If p is a border point, no points are density-reachablefrom p and DBSCAN visits the next point of the database

5. Continue the process until all of the points have beenprocessed

If a spatial index is used, the computational complexity of DBSCAN isO(nlogn), where n is the number of database objects. Otherwise, thecomplexity is O(n2)

58

Page 59: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

DBSCAN: Sensitive to Parameters

59

http://webdocs.cs.ualberta.ca/~yaling/Cluster/Applet/Code/Cluster.html

Page 60: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• OPTICS: Ordering Points To Identify the Clustering Structure• Ankerst, Breunig, Kriegel, and Sander (SIGMOD’99)• Produces a special order of the database wrt its density-

based clustering structure• This cluster-ordering contains info equiv to the density-

based clusterings corresponding to a broad range ofparameter settings

• Good for both automatic and interactive cluster analysis,including finding intrinsic clustering structure

• Can be represented graphically or using visualizationtechniques

OPTICS: A Cluster-Ordering Method (1999)

• OPTICS: Ordering Points To Identify the Clustering Structure• Ankerst, Breunig, Kriegel, and Sander (SIGMOD’99)• Produces a special order of the database wrt its density-

based clustering structure• This cluster-ordering contains info equiv to the density-

based clusterings corresponding to a broad range ofparameter settings

• Good for both automatic and interactive cluster analysis,including finding intrinsic clustering structure

• Can be represented graphically or using visualizationtechniques

• OPTICS: Ordering Points To Identify the Clustering Structure• Ankerst, Breunig, Kriegel, and Sander (SIGMOD’99)• Produces a special order of the database wrt its density-

based clustering structure• This cluster-ordering contains info equiv to the density-

based clusterings corresponding to a broad range ofparameter settings

• Good for both automatic and interactive cluster analysis,including finding intrinsic clustering structure

• Can be represented graphically or using visualizationtechniques

60

Page 61: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Index-based: k = # of dimensions, N: # of points• Complexity: O(N*logN)

• Core Distance of an object p: the smallest value ε such thatthe ε-neighborhood of p has at least MinPts objects

Let Nε(p): ε-neighborhood of p, ε is a distance valueCore-distanceε, MinPts(p) = Undefined if card(Nε(p)) < MinPts

MinPts-distance(p), otherwise• Reachability Distance of object p from core object q is the

min radius value that makes p density-reachable from qReachability-distanceε, MinPts(p, q) =

Undefined if q is not a core objectmax(core-distance(q), distance (q, p)), otherwise

OPTICS: Some Extension from DBSCAN

• Index-based: k = # of dimensions, N: # of points• Complexity: O(N*logN)

• Core Distance of an object p: the smallest value ε such thatthe ε-neighborhood of p has at least MinPts objects

Let Nε(p): ε-neighborhood of p, ε is a distance valueCore-distanceε, MinPts(p) = Undefined if card(Nε(p)) < MinPts

MinPts-distance(p), otherwise• Reachability Distance of object p from core object q is the

min radius value that makes p density-reachable from qReachability-distanceε, MinPts(p, q) =

Undefined if q is not a core objectmax(core-distance(q), distance (q, p)), otherwise

• Index-based: k = # of dimensions, N: # of points• Complexity: O(N*logN)

• Core Distance of an object p: the smallest value ε such thatthe ε-neighborhood of p has at least MinPts objects

Let Nε(p): ε-neighborhood of p, ε is a distance valueCore-distanceε, MinPts(p) = Undefined if card(Nε(p)) < MinPts

MinPts-distance(p), otherwise• Reachability Distance of object p from core object q is the

min radius value that makes p density-reachable from qReachability-distanceε, MinPts(p, q) =

Undefined if q is not a core objectmax(core-distance(q), distance (q, p)), otherwise

61

Page 62: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

Core Distance & Reachability Distance

62

Page 63: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

Reachability-distance

undefined

undefined

63

Cluster-order of the objects

Page 64: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

Density-Based Clustering: OPTICS & Applications:http://www.dbs.informatik.uni-muenchen.de/Forschung/KDD/Clustering/OPTICS/Demo

64

Page 65: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• DENsity-based CLUstEring by Hinneburg & Keim (KDD’98)

• Using statistical density functions:

• Major features• Solid mathematical foundation• Good for data sets with large amounts of noise• Allows a compact mathematical description of arbitrarily shaped

clusters in high-dimensional data sets• Significant faster than existing algorithm (e.g., DBSCAN)• But needs a large number of parameters

DENCLUE: Using Statistical Density Functions

total influence on x

• DENsity-based CLUstEring by Hinneburg & Keim (KDD’98)

• Using statistical density functions:

• Major features• Solid mathematical foundation• Good for data sets with large amounts of noise• Allows a compact mathematical description of arbitrarily shaped

clusters in high-dimensional data sets• Significant faster than existing algorithm (e.g., DBSCAN)• But needs a large number of parameters

f x y eGaussian

d x y

( , )( , )

2

22

N

i

xxdD

Gaussian

i

exf1

2

),(2

2

)(

N

i

xxd

iiD

Gaussian

i

exxxxf1

2

),(2

2

)(),( influence of y on x

gradient of x in thedirection of xi

• DENsity-based CLUstEring by Hinneburg & Keim (KDD’98)

• Using statistical density functions:

• Major features• Solid mathematical foundation• Good for data sets with large amounts of noise• Allows a compact mathematical description of arbitrarily shaped

clusters in high-dimensional data sets• Significant faster than existing algorithm (e.g., DBSCAN)• But needs a large number of parameters

65

Page 66: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Uses grid cells but only keeps information about grid cellsthat do actually contain data points and manages these cellsin a tree-based access structure

• Influence function: describes the impact of a data pointwithin its neighborhood

• Overall density of the data space can be calculated as thesum of the influence function of all data points

• Clusters can be determined mathematically by identifyingdensity attractors

• Density attractors are local maximal of the overall densityfunction

• Center defined clusters: assign to each density attractor thepoints density attracted to it

• Arbitrary shaped cluster: merge density attractors that areconnected through paths of high density (> threshold)

Denclue: Technical Essence

• Uses grid cells but only keeps information about grid cellsthat do actually contain data points and manages these cellsin a tree-based access structure

• Influence function: describes the impact of a data pointwithin its neighborhood

• Overall density of the data space can be calculated as thesum of the influence function of all data points

• Clusters can be determined mathematically by identifyingdensity attractors

• Density attractors are local maximal of the overall densityfunction

• Center defined clusters: assign to each density attractor thepoints density attracted to it

• Arbitrary shaped cluster: merge density attractors that areconnected through paths of high density (> threshold)

• Uses grid cells but only keeps information about grid cellsthat do actually contain data points and manages these cellsin a tree-based access structure

• Influence function: describes the impact of a data pointwithin its neighborhood

• Overall density of the data space can be calculated as thesum of the influence function of all data points

• Clusters can be determined mathematically by identifyingdensity attractors

• Density attractors are local maximal of the overall densityfunction

• Center defined clusters: assign to each density attractor thepoints density attracted to it

• Arbitrary shaped cluster: merge density attractors that areconnected through paths of high density (> threshold)

66

Page 67: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

Density Attractor

67

Page 68: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

Center-Defined and Arbitrary

68

Page 69: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

5.5 Grid-Based Methods

69

Page 70: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Using multi-resolution grid data structure• Several interesting methods

• STING (a STatistical INformation Grid approach) by Wang,Yang and Muntz (1997)

• WaveCluster by Sheikholeslami, Chatterjee, and Zhang(VLDB’98)

• A multi-resolution clustering approach usingwavelet method

• CLIQUE: Agrawal, et al. (SIGMOD’98)

• Both grid-based and subspace clustering

Grid-Based Clustering Method

• Using multi-resolution grid data structure• Several interesting methods

• STING (a STatistical INformation Grid approach) by Wang,Yang and Muntz (1997)

• WaveCluster by Sheikholeslami, Chatterjee, and Zhang(VLDB’98)

• A multi-resolution clustering approach usingwavelet method

• CLIQUE: Agrawal, et al. (SIGMOD’98)

• Both grid-based and subspace clustering

• Using multi-resolution grid data structure• Several interesting methods

• STING (a STatistical INformation Grid approach) by Wang,Yang and Muntz (1997)

• WaveCluster by Sheikholeslami, Chatterjee, and Zhang(VLDB’98)

• A multi-resolution clustering approach usingwavelet method

• CLIQUE: Agrawal, et al. (SIGMOD’98)

• Both grid-based and subspace clustering

70

Page 71: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Wang, Yang and Muntz (VLDB’97)• The spatial area is divided into rectangular cells• There are several levels of cells corresponding to

different levels of resolution

STING: A Statistical Information Grid Approach

• Wang, Yang and Muntz (VLDB’97)• The spatial area is divided into rectangular cells• There are several levels of cells corresponding to

different levels of resolution

71

Page 72: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Each cell at a high level is partitioned into a number ofsmaller cells in the next lower level

• Statistical info of each cell is calculated and storedbeforehand and is used to answer queries

• Parameters of higher level cells can be easily calculatedfrom parameters of lower level cell

• count, mean, s, min, max• type of distribution—normal, uniform, etc.

• Use a top-down approach to answer spatial data queries• Start from a pre-selected layer—typically with a small

number of cells• For each cell in the current level compute the confidence

interval

The STING Clustering Method

• Each cell at a high level is partitioned into a number ofsmaller cells in the next lower level

• Statistical info of each cell is calculated and storedbeforehand and is used to answer queries

• Parameters of higher level cells can be easily calculatedfrom parameters of lower level cell

• count, mean, s, min, max• type of distribution—normal, uniform, etc.

• Use a top-down approach to answer spatial data queries• Start from a pre-selected layer—typically with a small

number of cells• For each cell in the current level compute the confidence

interval

• Each cell at a high level is partitioned into a number ofsmaller cells in the next lower level

• Statistical info of each cell is calculated and storedbeforehand and is used to answer queries

• Parameters of higher level cells can be easily calculatedfrom parameters of lower level cell

• count, mean, s, min, max• type of distribution—normal, uniform, etc.

• Use a top-down approach to answer spatial data queries• Start from a pre-selected layer—typically with a small

number of cells• For each cell in the current level compute the confidence

interval

72

Page 73: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Remove the irrelevant cells from further consideration• When finish examining the current layer, proceed to the

next lower level• Repeat this process until the bottom layer is reached• Advantages:

• Query-independent, easy to parallelize, incrementalupdate

• O(K), where K is the number of grid cells at the lowestlevel

• Disadvantages:• All the cluster boundaries are either horizontal or

vertical, and no diagonal boundary is detected

STING Algorithm and Its Analysis

• Remove the irrelevant cells from further consideration• When finish examining the current layer, proceed to the

next lower level• Repeat this process until the bottom layer is reached• Advantages:

• Query-independent, easy to parallelize, incrementalupdate

• O(K), where K is the number of grid cells at the lowestlevel

• Disadvantages:• All the cluster boundaries are either horizontal or

vertical, and no diagonal boundary is detected

• Remove the irrelevant cells from further consideration• When finish examining the current layer, proceed to the

next lower level• Repeat this process until the bottom layer is reached• Advantages:

• Query-independent, easy to parallelize, incrementalupdate

• O(K), where K is the number of grid cells at the lowestlevel

• Disadvantages:• All the cluster boundaries are either horizontal or

vertical, and no diagonal boundary is detected

73

Page 74: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Agrawal, Gehrke, Gunopulos, Raghavan (SIGMOD’98)• Automatically identifying subspaces of a high

dimensional data space that allow better clusteringthan original space

• CLIQUE can be considered as both density-based andgrid-based

• It partitions each dimension into the same number of equallength interval

• It partitions an m-dimensional data space into non-overlapping rectangular units

• A unit is dense if the fraction of total data points contained inthe unit exceeds the input model parameter

• A cluster is a maximal set of connected dense units within asubspace

CLIQUE (Clustering In QUEst)

• Agrawal, Gehrke, Gunopulos, Raghavan (SIGMOD’98)• Automatically identifying subspaces of a high

dimensional data space that allow better clusteringthan original space

• CLIQUE can be considered as both density-based andgrid-based

• It partitions each dimension into the same number of equallength interval

• It partitions an m-dimensional data space into non-overlapping rectangular units

• A unit is dense if the fraction of total data points contained inthe unit exceeds the input model parameter

• A cluster is a maximal set of connected dense units within asubspace

• Agrawal, Gehrke, Gunopulos, Raghavan (SIGMOD’98)• Automatically identifying subspaces of a high

dimensional data space that allow better clusteringthan original space

• CLIQUE can be considered as both density-based andgrid-based

• It partitions each dimension into the same number of equallength interval

• It partitions an m-dimensional data space into non-overlapping rectangular units

• A unit is dense if the fraction of total data points contained inthe unit exceeds the input model parameter

• A cluster is a maximal set of connected dense units within asubspace

74

Page 75: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

1. Partition the data space and find the number ofpoints that lie inside each cell of the partition.

2. Identify the subspaces that contain clusters usingthe Apriori principle

3. Identify clusters1. Determine dense units in all subspaces of interests2. Determine connected dense units in all subspaces of

interests.

4. Generate minimal description for the clusters1. Determine maximal regions that cover a cluster of

connected dense units for each cluster2. Determination of minimal cover for each cluster

CLIQUE: The Major Steps

1. Partition the data space and find the number ofpoints that lie inside each cell of the partition.

2. Identify the subspaces that contain clusters usingthe Apriori principle

3. Identify clusters1. Determine dense units in all subspaces of interests2. Determine connected dense units in all subspaces of

interests.

4. Generate minimal description for the clusters1. Determine maximal regions that cover a cluster of

connected dense units for each cluster2. Determination of minimal cover for each cluster

1. Partition the data space and find the number ofpoints that lie inside each cell of the partition.

2. Identify the subspaces that contain clusters usingthe Apriori principle

3. Identify clusters1. Determine dense units in all subspaces of interests2. Determine connected dense units in all subspaces of

interests.

4. Generate minimal description for the clusters1. Determine maximal regions that cover a cluster of

connected dense units for each cluster2. Determination of minimal cover for each cluster

75

Page 76: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

Sala

ry(1

0,00

0)

54

32

67

54

32

67

Vaca

tion(

wee

k)

20 30 40 50 60age

12

0

20 30 40 50 60age

12

0

Vaca

tion

= 3

76

age

Vaca

tion

30 50

Page 77: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Strength• automatically finds subspaces of the highest

dimensionality such that high density clusters exist inthose subspaces

• insensitive to the order of records in input and does notpresume some canonical data distribution

• scales linearly with the size of input and has goodscalability as the number of dimensions in the dataincreases

• Weakness• The accuracy of the clustering result may be degraded at

the expense of simplicity of the method

Strength and Weakness of CLIQUE

• Strength• automatically finds subspaces of the highest

dimensionality such that high density clusters exist inthose subspaces

• insensitive to the order of records in input and does notpresume some canonical data distribution

• scales linearly with the size of input and has goodscalability as the number of dimensions in the dataincreases

• Weakness• The accuracy of the clustering result may be degraded at

the expense of simplicity of the method

• Strength• automatically finds subspaces of the highest

dimensionality such that high density clusters exist inthose subspaces

• insensitive to the order of records in input and does notpresume some canonical data distribution

• scales linearly with the size of input and has goodscalability as the number of dimensions in the dataincreases

• Weakness• The accuracy of the clustering result may be degraded at

the expense of simplicity of the method

77

Page 78: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

5.6 Evaluation of Clustering

78

Page 79: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Assess if non-random structure exists in the data bymeasuring the probability that the data is generated bya uniform data distribution

• Test spatial randomness by statistic test: Hopkins Static• Given a dataset D regarded as a sample of a random variable

o, determine how far away o is from being uniformlydistributed in the data space

• Sample n points, p1, …, pn, uniformly from D. For each pi,find its nearest neighbor in D: xi = min{dist (pi, v)} where v inD

• Sample n points, q1, …, qn, uniformly from D. For each qi,find its nearest neighbor in D – {qi}: yi = min{dist (qi, v)}where v in D and v ≠ qi

• Calculate the Hopkins Statistic:

• If D is uniformly distributed, ∑ xi and ∑ yi will be close to eachother and H is close to 0.5. If D is clustered, H is close to 1

Assessing Clustering Tendency

• Assess if non-random structure exists in the data bymeasuring the probability that the data is generated bya uniform data distribution

• Test spatial randomness by statistic test: Hopkins Static• Given a dataset D regarded as a sample of a random variable

o, determine how far away o is from being uniformlydistributed in the data space

• Sample n points, p1, …, pn, uniformly from D. For each pi,find its nearest neighbor in D: xi = min{dist (pi, v)} where v inD

• Sample n points, q1, …, qn, uniformly from D. For each qi,find its nearest neighbor in D – {qi}: yi = min{dist (qi, v)}where v in D and v ≠ qi

• Calculate the Hopkins Statistic:

• If D is uniformly distributed, ∑ xi and ∑ yi will be close to eachother and H is close to 0.5. If D is clustered, H is close to 1

• Assess if non-random structure exists in the data bymeasuring the probability that the data is generated bya uniform data distribution

• Test spatial randomness by statistic test: Hopkins Static• Given a dataset D regarded as a sample of a random variable

o, determine how far away o is from being uniformlydistributed in the data space

• Sample n points, p1, …, pn, uniformly from D. For each pi,find its nearest neighbor in D: xi = min{dist (pi, v)} where v inD

• Sample n points, q1, …, qn, uniformly from D. For each qi,find its nearest neighbor in D – {qi}: yi = min{dist (qi, v)}where v in D and v ≠ qi

• Calculate the Hopkins Statistic:

• If D is uniformly distributed, ∑ xi and ∑ yi will be close to eachother and H is close to 0.5. If D is clustered, H is close to 1

79

Page 80: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Empirical method• # of clusters ≈√n/2 for a dataset of n points

• Elbow method• Use the turning point in the curve of sum of within cluster variance

w.r.t the # of clusters• Cross validation method

• Divide a given data set into m parts• Use m – 1 parts to obtain a clustering model• Use the remaining part to test the quality of the clustering

• E.g., For each point in the test set, find the closest centroid,and use the sum of squared distance between all points in thetest set and the closest centroids to measure how well themodel fits the test set

• For any k > 0, repeat it m times, compare the overall qualitymeasure w.r.t. different k’s, and find # of clusters that fits the datathe best

Determine the Number of Clusters• Empirical method

• # of clusters ≈√n/2 for a dataset of n points• Elbow method

• Use the turning point in the curve of sum of within cluster variancew.r.t the # of clusters

• Cross validation method• Divide a given data set into m parts• Use m – 1 parts to obtain a clustering model• Use the remaining part to test the quality of the clustering

• E.g., For each point in the test set, find the closest centroid,and use the sum of squared distance between all points in thetest set and the closest centroids to measure how well themodel fits the test set

• For any k > 0, repeat it m times, compare the overall qualitymeasure w.r.t. different k’s, and find # of clusters that fits the datathe best

• Empirical method• # of clusters ≈√n/2 for a dataset of n points

• Elbow method• Use the turning point in the curve of sum of within cluster variance

w.r.t the # of clusters• Cross validation method

• Divide a given data set into m parts• Use m – 1 parts to obtain a clustering model• Use the remaining part to test the quality of the clustering

• E.g., For each point in the test set, find the closest centroid,and use the sum of squared distance between all points in thetest set and the closest centroids to measure how well themodel fits the test set

• For any k > 0, repeat it m times, compare the overall qualitymeasure w.r.t. different k’s, and find # of clusters that fits the datathe best

80

Page 81: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Two methods: extrinsic vs. intrinsic

• Extrinsic: supervised, i.e., the ground truth is available

• Compare a clustering against the ground truth usingcertain clustering quality measure

• Ex. BCubed precision and recall metrics

• Intrinsic: unsupervised, i.e., the ground truth is unavailable

• Evaluate the goodness of a clustering by consideringhow well the clusters are separated, and how compactthe clusters are

• Ex. Silhouette coefficient

Measuring Clustering Quality

• Two methods: extrinsic vs. intrinsic

• Extrinsic: supervised, i.e., the ground truth is available

• Compare a clustering against the ground truth usingcertain clustering quality measure

• Ex. BCubed precision and recall metrics

• Intrinsic: unsupervised, i.e., the ground truth is unavailable

• Evaluate the goodness of a clustering by consideringhow well the clusters are separated, and how compactthe clusters are

• Ex. Silhouette coefficient

• Two methods: extrinsic vs. intrinsic

• Extrinsic: supervised, i.e., the ground truth is available

• Compare a clustering against the ground truth usingcertain clustering quality measure

• Ex. BCubed precision and recall metrics

• Intrinsic: unsupervised, i.e., the ground truth is unavailable

• Evaluate the goodness of a clustering by consideringhow well the clusters are separated, and how compactthe clusters are

• Ex. Silhouette coefficient

81

Page 82: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Clustering quality measure: Q(C, Cg), for a clustering C giventhe ground truth Cg.

• Q is good if it satisfies the following 4 essential criteria• Cluster homogeneity: the purer, the better• Cluster completeness: should assign objects belong to

the same category in the ground truth to the samecluster

• Rag bag: putting a heterogeneous object into a purecluster should be penalized more than putting it into arag bag (i.e., “miscellaneous” or “other” category)

• Small cluster preservation: splitting a small category intopieces is more harmful than splitting a large categoryinto pieces

Measuring Clustering Quality: ExtrinsicMethods

• Clustering quality measure: Q(C, Cg), for a clustering C giventhe ground truth Cg.

• Q is good if it satisfies the following 4 essential criteria• Cluster homogeneity: the purer, the better• Cluster completeness: should assign objects belong to

the same category in the ground truth to the samecluster

• Rag bag: putting a heterogeneous object into a purecluster should be penalized more than putting it into arag bag (i.e., “miscellaneous” or “other” category)

• Small cluster preservation: splitting a small category intopieces is more harmful than splitting a large categoryinto pieces

• Clustering quality measure: Q(C, Cg), for a clustering C giventhe ground truth Cg.

• Q is good if it satisfies the following 4 essential criteria• Cluster homogeneity: the purer, the better• Cluster completeness: should assign objects belong to

the same category in the ground truth to the samecluster

• Rag bag: putting a heterogeneous object into a purecluster should be penalized more than putting it into arag bag (i.e., “miscellaneous” or “other” category)

• Small cluster preservation: splitting a small category intopieces is more harmful than splitting a large categoryinto pieces

82

Page 83: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

• Cluster analysis groups objects based on their similarity and haswide applications

• Measure of similarity can be computed for various types of data• Clustering algorithms can be categorized into partitioning

methods, hierarchical methods, density-based methods, grid-based methods, and model-based methods

• K-means and K-medoids algorithms are popular partitioning-based clustering algorithms

• Birch and Chameleon are interesting hierarchical clusteringalgorithms, and there are also probabilistic hierarchical clusteringalgorithms

• DBSCAN, OPTICS, and DENCLU are interesting density-basedalgorithms

• STING and CLIQUE are grid-based methods, where CLIQUE is alsoa subspace clustering algorithm

• Quality of clustering results can be evaluated in various ways

Rangkuman• Cluster analysis groups objects based on their similarity and has

wide applications• Measure of similarity can be computed for various types of data• Clustering algorithms can be categorized into partitioning

methods, hierarchical methods, density-based methods, grid-based methods, and model-based methods

• K-means and K-medoids algorithms are popular partitioning-based clustering algorithms

• Birch and Chameleon are interesting hierarchical clusteringalgorithms, and there are also probabilistic hierarchical clusteringalgorithms

• DBSCAN, OPTICS, and DENCLU are interesting density-basedalgorithms

• STING and CLIQUE are grid-based methods, where CLIQUE is alsoa subspace clustering algorithm

• Quality of clustering results can be evaluated in various ways

• Cluster analysis groups objects based on their similarity and haswide applications

• Measure of similarity can be computed for various types of data• Clustering algorithms can be categorized into partitioning

methods, hierarchical methods, density-based methods, grid-based methods, and model-based methods

• K-means and K-medoids algorithms are popular partitioning-based clustering algorithms

• Birch and Chameleon are interesting hierarchical clusteringalgorithms, and there are also probabilistic hierarchical clusteringalgorithms

• DBSCAN, OPTICS, and DENCLU are interesting density-basedalgorithms

• STING and CLIQUE are grid-based methods, where CLIQUE is alsoa subspace clustering algorithm

• Quality of clustering results can be evaluated in various ways

83

Page 84: Data Mining: 5. Algoritma Klasteringamutiara.staff.gunadarma.ac.id/Downloads/files/66344/05...• Clustering all the data instead of only on samples • Ability to deal with different

1. Jiawei Han and Micheline Kamber, Data Mining: Concepts andTechniques Third Edition, Elsevier, 2012

2. Ian H. Witten, Frank Eibe, Mark A. Hall, Data mining: PracticalMachine Learning Tools and Techniques 3rd Edition, Elsevier, 2011

3. Markus Hofmann and Ralf Klinkenberg, RapidMiner: Data MiningUse Cases and Business Analytics Applications, CRC Press Taylor &Francis Group, 2014

4. Daniel T. Larose, Discovering Knowledge in Data: an Introductionto Data Mining, John Wiley & Sons, 2005

5. Ethem Alpaydin, Introduction to Machine Learning, 3rd ed., MITPress, 2014

6. Florin Gorunescu, Data Mining: Concepts, Models andTechniques, Springer, 2011

7. Oded Maimon and Lior Rokach, Data Mining and KnowledgeDiscovery Handbook Second Edition, Springer, 2010

8. Warren Liao and Evangelos Triantaphyllou (eds.), Recent Advancesin Data Mining of Enterprise Data: Algorithms and Applications,World Scientific, 2007

Referensi

1. Jiawei Han and Micheline Kamber, Data Mining: Concepts andTechniques Third Edition, Elsevier, 2012

2. Ian H. Witten, Frank Eibe, Mark A. Hall, Data mining: PracticalMachine Learning Tools and Techniques 3rd Edition, Elsevier, 2011

3. Markus Hofmann and Ralf Klinkenberg, RapidMiner: Data MiningUse Cases and Business Analytics Applications, CRC Press Taylor &Francis Group, 2014

4. Daniel T. Larose, Discovering Knowledge in Data: an Introductionto Data Mining, John Wiley & Sons, 2005

5. Ethem Alpaydin, Introduction to Machine Learning, 3rd ed., MITPress, 2014

6. Florin Gorunescu, Data Mining: Concepts, Models andTechniques, Springer, 2011

7. Oded Maimon and Lior Rokach, Data Mining and KnowledgeDiscovery Handbook Second Edition, Springer, 2010

8. Warren Liao and Evangelos Triantaphyllou (eds.), Recent Advancesin Data Mining of Enterprise Data: Algorithms and Applications,World Scientific, 2007

1. Jiawei Han and Micheline Kamber, Data Mining: Concepts andTechniques Third Edition, Elsevier, 2012

2. Ian H. Witten, Frank Eibe, Mark A. Hall, Data mining: PracticalMachine Learning Tools and Techniques 3rd Edition, Elsevier, 2011

3. Markus Hofmann and Ralf Klinkenberg, RapidMiner: Data MiningUse Cases and Business Analytics Applications, CRC Press Taylor &Francis Group, 2014

4. Daniel T. Larose, Discovering Knowledge in Data: an Introductionto Data Mining, John Wiley & Sons, 2005

5. Ethem Alpaydin, Introduction to Machine Learning, 3rd ed., MITPress, 2014

6. Florin Gorunescu, Data Mining: Concepts, Models andTechniques, Springer, 2011

7. Oded Maimon and Lior Rokach, Data Mining and KnowledgeDiscovery Handbook Second Edition, Springer, 2010

8. Warren Liao and Evangelos Triantaphyllou (eds.), Recent Advancesin Data Mining of Enterprise Data: Algorithms and Applications,World Scientific, 2007

84