Survey of Clustering Algorithms
Survey of Clustering Algorithms
PREPARED BY-
GUIDED BY-
JYOTISMITA TALUKDAR
ASST. PROFESSOR
CIT, UTM
CONTENTS
PROBLEM STATEMENT
WHAT IS CLUSTERING?
ALGORITHMS FOR CLUSTERING
HIERARCHICAL CLUSTERING
PARTITIONING BASED CLUSTERING
k-means algorithm
AIM:
HERE WE USE WEKA TOOL TO COMPARE DIFFERENT CLUSTERING ALGORITHM ON IRIS
DATA SET AND SHOWN DIFFERENCES BETWEEN THEM.
WHAT IS CLUSTERING?
CLUSTERING IS THE MOST COMMON FORM OF UNSUPERVISED LEARNING.
APPLICATION
Clustering help marketers discover distinct groups in their customer base. and they can
characterize their customer groups based on the purchasing patterns.
Thematic maps in GIS by clustering feature spaces
WWW
Document classification
Cluster weblog data to discover groups of similar access patterns
Clustering is also used in outlier detection applications such as detection of credit card fraud.
As data mining function, cluster analysis serves as a tool to gain insight into the distribution of
data to observe characteristics of each cluster.
ALGORITHMS TO BE
ANALYSED
Hierarchical Clustering
The distance function is calculated on the basis of the characteristics we want to cluster.
Hierarchical:
Agglomerative (bottom up):
Initially, each point is a cluster
Repeatedly combine the two
nearest clusters into one
Divisive (top down):
start with one cluster and recursively split it
s
r
e
w
Ans
1.
2.
Algorithm
Hierarchical
Clustering
1.Begin with the disjoint clustering having level L(0) = 0 and sequence number m
= 0.
2. Find the least dissimilar pair of clusters in the current clustering, say pair (r),
(s), according to
where the minimum is over all pairs of clusters in the current clustering.
d[(r),(s)] = min
d[(i),(j)]
3. Increment the sequence number : m = m +1. Merge clusters (r) and (s) into a
single cluster to form the next clustering m. Set the level of this clustering to
L(m) = d[(r),(s)]
Cont.
Hierarchical
Clustering
4.Update the proximity matrix, D, by deleting the rows and columns corresponding to clusters (r)
and (s) and adding a row and column corresponding to the newly formed cluster.
5.The proximity between the new cluster, denoted (r,s) and old cluster (k) is defined in this way:
d[(k), (r,s)] = min d[(k),(r)], d[(k),
(s)]
6.If all objects are in one cluster, stop. Else, go to step 2.
Data:
o data point
x centroid
o (4,1)
x (4.7,1.3)
x (4.5,0.5)
o (5,0)
13
Dendrogram
Implementation
//Assigning points to
array
loop: i=0 to n
a[i] = Point(i);
Complexities
Complexity of setting the points to array=O(n)
Complexity of calculating d[i,j]=O(nlog(n))
Complexity of clustering=O(n2log(n))
PARTITIONING BASED
Suppose we are given a database of n objects and the partitioning method constructs k
partition of data. Each partition will represent a cluster and k n. It means that it will
classify the data into k groups, which satisfy the following requirements
K-MEANS CLUSTERING
KMEANS ALGORITHM(S)
ASSUMES EUCLIDEAN SPACE/DISTANCE
START BY PICKING K, THE NUMBER OF CLUSTERS
INITIALIZE CLUSTERS BY PICKING ONE POINT PER CLUSTER
FOR THE MOMENT, ASSUME WE PICK THE K POINTS AT RANDOM
19
POPULATING CLUSTERS
1) FOR EACH POINT, PLACE IT IN THE CLUSTER WHOSE CURRENT CENTROID IT IS NEAREST
2) AFTER ALL POINTS ARE ASSIGNED, UPDATE THE LOCATIONS OF CENTROIDS OF THE K
CLUSTERS
3) REASSIGN ALL POINTS TO THEIR CLOSEST CENTROID
SOMETIMES MOVES POINTS BETWEEN CLUSTERS
REPEAT 2 AND 3 UNTIL CONVERGENCE
CONVERGENCE: POINTS DONT MOVE BETWEEN CLUSTERS AND CENTROIDS STABILIZE
20
21
x data point
centroid
22
x data point
centroid
23
x data point
centroid
24
Average
distance to
centroid
Best value
of k
k
25
EXAMPLE: PICKING K
Too few;
many long
distances
to centroid.
x
x
x x x x
x xx x
x x x
x x
x
xx x
x x
x x x
x
xx x
x
x x
x x x x
x x x
x
26
Just right;
distances
rather short.
x
x
x x x x
x xx x
x x x
x x
x
xx x
x x
x x x
x
xx x
x
x x
x x x x
x x x
x
27
Too many;
little improvement
in average
distance.
x
x
x x x x
x xx x
x x x
x x
x
xx x
x x
x x x
x
xx x
x
x x
x x x x
x x x
x
28
ADVANTAGES OF K-MEANS
COMPLEXITY:
EACH ROUND IS O(KN) FOR N POINTS, K CLUSTER
29
DISADVANTAGES
30
WEKA
WAIKATO ENVIRONMENT FOR KNOWLEDGE ANALYSIS (WEKA) IS A
POPULAR SUITE OF MACHINE LEARNING SOFTWARE WRITTEN IN JAVA,
DEVELOPED AT THE UNIVERSITY OF WAIKATO, NEW ZEALAND
IRIS DATA
31
32
HIERARCHAL ALGORITHM
33
K-MEANS
34
FURTHER WORK
35
CONCLUSION
EVERY ALGORITHM HAS THEIR OWN IMPORTANCE AND WE USE THEM ON THE BEHAVIOR
OF THE DATA
36
REFERENCES
YRM, S. AND KRKKINEN, T. INTRODUCTION TO PARTITIONING-BASED CLUSTERING METHODS WITH A ROBUST EXAMPLE,
REPORTS OF THE DEPT. OF MATH. INF. TECH. (SERIES C. SOFTWARE AND COMPUTATIONAL ENGINEERING), 1/2006, UNIVERSITY
OF JYVSKYL, 2006.
BERKHIN, P. (1998). SURVEY OF CLUSTERING DATA MINING TECHNIQUES. RETRIEVED NOVEMBER 6TH, 2015, WEBSITE:
E.B FAWLKES AND C.L. MALLOWS, A METHOD FOR COMPARING TWO HIERARCHICAL CLUSTERINGS, JOURNAL OF THE
AMERICAN STATISTICAL ASSOCIATION, 78:553584, 1983.
J. BEZDEK AND R. HATHAWAY, NUMERICAL CONVERGENCE AND INTERPRETATION OF THE FUZZY C-SHELLS CLUSTERING
ALGORITHMS, IEEE TRANS. NEURAL NETW., VOL. 3, NO. 5, PP. 787793, SEP. 1992.
M. AND HECKERMAN, D. (FEBRUARY, 1998), AN EXPERIMENTAL COMPARISON OF SEVERAL CLUSTERING AND INITIALIZATION
METHOD, TECHNICAL REPORT MSRTR-98-06, MICROSOFT RESEARCH, REDMOND, WA
MYTHILI S ET AL, INTERNATIONAL JOURNAL OF COMPUTER SCIENCE AND MOBILE COMPUTING, VOL.3 ISSUE.1 , JANUARY- 2014,
PG. 334-340
NARENDRA SHARMA, AMAN BAJPAI, MR. RATNESH LITORIYA COMPARISON THE VARIOUS CLUSTERING ALGORITHMS OF WEKA
TOOLS, INTERNATIONAL JOURNAL OF EMERGING TECHNOLOGY AND ADVANCED ENGINEERING, VOLUME 2, ISSUE 5, MAY 2012.
R. DAV, ADAPTIVE FUZZY C-SHELLS CLUSTERING AND DETECTION OF ELLIPSES, IEEE TRANS. NEURAL NETW., VOL. 3, NO. 5, PP.
643662, SEP. 1992.
T. VELMURUGAN AND T. SANTHANAM, 2011. A SURVEY OF PARTITION BASED CLUSTERING ALGORITHMS IN DATA MINING: AN
EXPERIMENTAL APPROACH. INFORMATION TECHNOLOGY JOURNAL, 10: 478-484.
37
WEKA AT HTTP://WWW.CS.WAIKATO.AC.NZ/~ML/WEKA.