SlideShare a Scribd company logo
1 of 64
Aditya Engineering College (A)
Data Warehousing & Data
Mining
By
A.K.Chakravarthy
Assistant Professor
Dept of Information Technology
Aditya Engineering College(A)
Surampalem.
What is Cluster Analysis?
• Finding groups of objects such that the objects in a group will
be similar (or related) to one another and different from (or
unrelated to) the objects in other groups
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
Inter-cluster
distances are
maximized
Intra-cluster
distances are
minimized
Aditya Engineering College (A)
24-04-2020
Applications
• Informational Retrieval
• Biology
• Climate
• Business
• Lot more..
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
Aditya Engineering College (A)
What is not Cluster Analysis?
• Simple segmentation
– Dividing students into different registration groups alphabetically,
by last name
• Results of a query
– Groupings are a result of an external specification
– Clustering is a grouping of objects based on the data
• Supervised classification
– Have class label information
• Association Analysis
– Local vs. global connections
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
Aditya Engineering College (A)
Notion of a Cluster can be Ambiguous
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
How many clusters?
Four ClustersTwo Clusters
Six Clusters
Aditya Engineering College (A)
Types of Clusterings
• A clustering is a set of clusters
• Important distinction between hierarchical
and partitional sets of clusters
• Partitional Clustering
– A division of data objects into non-overlapping subsets (clusters)
such that each data object is in exactly one subset
• Hierarchical clustering
– A set of nested clusters organized as a hierarchical tree
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
Aditya Engineering College (A)
Partitional Clustering
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
Original Points A Partitional Clustering
Aditya Engineering College
Hierarchical Clustering
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
p4
p1
p3
p2
p4
p1
p3
p2
Traditional Hierarchical Clustering
Non-traditional Hierarchical Clustering
Aditya Engineering College (A)
Other Distinctions Between Sets of Clusters
• Exclusive versus non-exclusive
– In non-exclusive clusterings, points may belong to multiple clusters.
– Can represent multiple classes or ‘border’ points
• Fuzzy versus non-fuzzy
– In fuzzy clustering, a point belongs to every cluster with some
weight between 0 and 1
– Weights must sum to 1
– Probabilistic clustering has similar characteristics
• Partial versus complete
– In some cases, we only want to cluster some of the data
• Heterogeneous versus homogeneous
– Clusters of widely different sizes, shapes, and densities
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
Aditya Engineering College (A)
Types of Clusters
• Well-separated clusters
• Center-based clusters
• Contiguous clusters
• Density-based clusters
• Property or Conceptual
• Described by an Objective Function
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
Aditya Engineering College (A)
Types of Clusters: Well-Separated
• Well-Separated Clusters:
– A cluster is a set of points such that any point in a cluster is closer
(or more similar) to every other point in the cluster than to any
point not in the cluster.
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
3 well-separated clusters
Aditya Engineering College (A)
Types of Clusters: Center-Based
• Center-based
– A cluster is a set of objects such that an object in a cluster is closer
(more similar) to the “center” of a cluster, than to the center of any
other cluster
– The center of a cluster is often a centroid, the average of all the
points in the cluster, or a medoid, the most “representative” point
of a cluster
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
4 center-based clusters
ADITYA ENGINEERING COLLEGE(A)
Types of Clusters: Contiguity-Based
• Contiguous Cluster (Nearest neighbor or
Transitive)
– A cluster is a set of points such that a point in a cluster is closer (or
more similar) to one or more other points in the cluster than to any
point not in the cluster.
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
8 contiguous clusters
ADITYA ENGINEERING COLLEGE(A)
Types of Clusters: Density-Based
• Density-based
– A cluster is a dense region of points, which is separated by low-
density regions, from other regions of high density.
– Used when the clusters are irregular or intertwined, and when noise
and outliers are present.
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
6 density-based clusters
ADITYA ENGINEERING COLLEGE(A)
Types of Clusters: Conceptual Clusters
• Shared Property or Conceptual Clusters
– Finds clusters that share some common property or represent a
particular concept.
.
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
2 Overlapping Circles
ADITYA ENGINEERING COLLEGE(A)
Types of Clusters: Objective Function
• Clusters Defined by an Objective Function
– Finds clusters that minimize or maximize an objective function.
– Enumerate all possible ways of dividing the points into clusters and
evaluate the `goodness' of each potential set of clusters by using the
given objective function. (NP Hard)
– Can have global or local objectives.
• Hierarchical clustering algorithms typically have local objectives
• Partitional algorithms typically have global objectives
– A variation of the global objective function approach is to fit the data to a
parameterized model.
• Parameters for the model are determined from the data.
• Mixture models assume that the data is a ‘mixture' of a number of statistical
distributions.
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
ADITYA ENGINEERING COLLEGE(A)
Clustering Algorithms
• K-means and its variants
• Hierarchical clustering
• Density-based clustering
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
ADITYA ENGINEERING COLLEGE(A)
K-means Clustering
• Partitional clustering approach
• Number of clusters, K, must be specified
• Each cluster is associated with a centroid (center point)
• Each point is assigned to the cluster with the closest centroid
• The basic algorithm is very simple
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
ADITYA ENGINEERING COLLEGE(A)
Example of K-means Clustering
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 1
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 3
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 5
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 6
Aditya Engineering College (A)
K-means Clustering – Details
• Initial centroids are often chosen randomly.
– Clusters produced vary from one run to another.
• The centroid is (typically) the mean of the points in the cluster.
• ‘Closeness’ is measured by Euclidean distance, cosine similarity, correlation,
etc.
• K-means will converge for common similarity measures mentioned above.
• Most of the convergence happens in the first few iterations.
– Often the stopping condition is changed to ‘Until relatively few points
change clusters’
• Complexity is O( n * K * I * d )
– n = number of points, K = number of clusters,
I = number of iterations, d = number of attributes
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
ADITYA ENGINEERING COLLEGE(A)
Evaluating K-means Clusters
 

K
i Cx
i
i
xmdistSSE
1
2
),(
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
• Most common measure is Sum of Squared Error (SSE)
– For each point, the error is the distance to the nearest cluster
– To get SSE, we square these errors and sum them.
– x is a data point in cluster Ci and mi is the representative point for
cluster Ci
• can show that mi corresponds to the center (mean) of the cluster
– Given two sets of clusters, we prefer the one with the smallest error
– One easy way to reduce SSE is to increase K, the number of clusters
• A good clustering with smaller K can have a lower SSE than a poor
clustering with higher K
ADITYA ENGINEERING COLLEGE(A)
Two different K-means Clusterings
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Sub-optimal Clustering
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Optimal Clustering
Original Points
ADITYA ENGINEERING COLLEGE(A)
Limitations of K-means
• K-means has problems when clusters are of
differing
– Sizes
– Densities
– Non-globular shapes
• K-means has problems when the data contains
outliers.
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
ADITYA ENGINEERING COLLEGE(A)
Limitations of K-means: Differing Sizes
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Original Points K-means (3 Clusters)
Aditya Engineering College (A)
Limitations of K-means: Differing Density
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Original Points K-means (3 Clusters)
Aditya Engineering College (A)
Limitations of K-means: Non-globular Shapes
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Original Points K-means (2 Clusters)
Aditya Engineering College (A)
Overcoming K-means Limitations
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Original Points K-means Clusters
One solution is to use many clusters.
Find parts of clusters, but need to put together.
Aditya Engineering College (A)
Overcoming K-means Limitations
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Original Points K-means Clusters
Aditya Engineering College (A)
Overcoming K-means Limitations
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Original Points K-means Clusters
Aditya Engineering College (A)
Importance of Choosing Initial Centroids
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 6
Aditya Engineering College (A)
Importance of Choosing Initial Centroids
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 1
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 2
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 3
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 5
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
0
0.5
1
1.5
2
2.5
3
x
y
Iteration 6
Aditya Engineering College (A)
Solutions to Initial Centroids
Problem
• Multiple runs
– Helps, but probability is not on your side
• Sample and use hierarchical clustering to
determine initial centroids
• Select more than k initial centroids and then
select among these initial centroids
– Select most widely separated
• Postprocessing
• Generate a larger number of clusters and then
perform a hierarchical clustering
• Bisecting K-means
– Not as susceptible to initialization issues
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
Pre-processing and Post-processing
• Pre-processing
– Normalize the data
– Eliminate outliers
• Post-processing
– Eliminate small clusters that may represent outliers
– Split ‘loose’ clusters, i.e., clusters with relatively high
SSE
– Merge clusters that are ‘close’ and that have relatively
low SSE
– Can use these steps during the clustering process
• ISODATA
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
Bisecting K-means
• Bisecting K-means algorithm
– Variant of K-means that can produce a partitional or a hierarchical
clustering
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
CLUTO: http://glaros.dtc.umn.edu/gkhome/cluto/cluto/overview
Aditya Engineering College (A)
Bisecting K-means Example
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
Hierarchical Clustering
• Produces a set of nested clusters organized as
a hierarchical tree
• Can be visualized as a dendrogram
– A tree like diagram that records the sequences of
merges or splits
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
1 3 2 5 4 6
0
0.05
0.1
0.15
0.2
1
2
3
4
5
6
1
2
3 4
5
Aditya Engineering College (A)
Hierarchical Clustering
• Two main types of hierarchical clustering
– Agglomerative:
• Start with the points as individual clusters
• At each step, merge the closest pair of clusters until only one cluster (or k
clusters) left
– Divisive:
• Start with one, all-inclusive cluster
• At each step, split a cluster until each cluster contains an individual point
(or there are k clusters)
• Traditional hierarchical algorithms use a similarity or distance
matrix
– Merge or split one cluster at a time
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
Strengths of Hierarchical Clustering
• Do not have to assume any particular number
of clusters
– Any desired number of clusters can be obtained
by ‘cutting’ the dendrogram at the proper level
• They may correspond to meaningful
taxonomies
– Example in biological sciences (e.g., animal
kingdom, phylogeny reconstruction, …)
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
Agglomerative Clustering Algorithm
• Most popular hierarchical clustering technique
• Basic algorithm is straightforward
1. Compute the proximity matrix
2. Let each data point be a cluster
3. Repeat
4. Merge the two closest clusters
5. Update the proximity matrix
6. Until only a single cluster remains
• Key operation is the computation of the proximity of two
clusters
– Different approaches to defining the distance between clusters
distinguish the different algorithms
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
How to Define Inter-Cluster Distance
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
p1
p3
p5
p4
p2
p1 p2 p3 p4 p5 . . .
.
.
.
Similarity?
 MIN
 MAX
 Group Average
 Distance Between Centroids
 Other methods driven by an objective
function
– Ward’s Method uses squared error
Proximity Matrix
Aditya Engineering College (A)
How to Define Inter-Cluster Similarity
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
p1
p3
p5
p4
p2
p1 p2 p3 p4 p5 . . .
.
.
.
Proximity Matrix
 MIN
 MAX
 Group Average
 Distance Between Centroids
 Other methods driven by an objective
function
– Ward’s Method uses squared error
Aditya Engineering College (A)
How to Define Inter-Cluster Similarity
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
p1
p3
p5
p4
p2
p1 p2 p3 p4 p5 . . .
.
.
.
Proximity Matrix
 MIN
 MAX
 Group Average
 Distance Between Centroids
 Other methods driven by an objective
function
– Ward’s Method uses squared error
Aditya Engineering College (A)
How to Define Inter-Cluster Similarity
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
p1
p3
p5
p4
p2
p1 p2 p3 p4 p5 . . .
.
.
.
Proximity Matrix
 MIN
 MAX
 Group Average
 Distance Between Centroids
 Other methods driven by an objective
function
– Ward’s Method uses squared error
Aditya Engineering College (A)
How to Define Inter-Cluster Similarity
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
p1
p3
p5
p4
p2
p1 p2 p3 p4 p5 . . .
.
.
.
Proximity Matrix
 MIN
 MAX
 Group Average
 Distance Between Centroids
 Other methods driven by an objective
function
– Ward’s Method uses squared error
 
Aditya Engineering College (A)
MIN or Single Link
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
• Proximity of two clusters is based on the two
closest points in the different clusters
– Determined by one pair of points, i.e., by one link in
the proximity graph
• Example:
Distance Matrix:
Aditya Engineering College (A)
Hierarchical Clustering: MIN
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Nested Clusters Dendrogram
1
2
3
4
5
6
1
2
3
4
5
Aditya Engineering College (A)
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
Strength of MIN
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Original Points Six Clusters
• Can handle non-elliptical shapes
Aditya Engineering College (A)
Limitations of MIN
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Original Points
Two Clusters
• Sensitive to noise and outliers
Three Clusters
Aditya Engineering College (A)
MAX or Complete Linkage
• Proximity of two clusters is based on the two
most distant points in the different clusters
– Determined by all pairs of points in the two
clusters
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Distance Matrix:
Aditya Engineering College (A)
Hierarchical Clustering: MAX
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Nested Clusters Dendrogram
1
2
3
4
5
6
1
2 5
3
4
Aditya Engineering College (A)
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
Strength of MAX
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Original Points Two Clusters
• Less susceptible to noise and outliers
Aditya Engineering College (A)
Limitations of MAX
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Original Points Two Clusters
• Tends to break large clusters
• Biased towards globular clusters
Aditya Engineering College (A)
Group Average
• Proximity of two clusters is the average of pairwise proximity
between points in the two clusters.
• Need to use average connectivity for scalability since total proximity
favors large clusters
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
||Cluster||Cluster
)p,pproximity(
)Cluster,Clusterproximity(
ji
Clusterp
Clusterp
ji
ji
jj
ii





Distance Matrix:
Aditya Engineering College (A)
Hierarchical Clustering: Group Average
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Nested Clusters Dendrogram
1
2
3
4
5
6
1
2
5
3
4
Aditya Engineering College (A)
Hierarchical Clustering: Group Average
• Compromise between Single and Complete
Link
• Strengths
– Less susceptible to noise and outliers
• Limitations
– Biased towards globular clusters
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
Cluster Similarity: Ward’s Method
• Similarity of two clusters is based on the increase
in squared error when two clusters are merged
– Similar to group average if distance between points is
distance squared
• Less susceptible to noise and outliers
• Biased towards globular clusters
• Hierarchical analogue of K-means
– Can be used to initialize K-means
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
Hierarchical Clustering: Comparison
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Group Average
Ward’s Method
1
2
3
4
5
6
1
2
5
3
4
MIN MAX
1
2
3
4
5
6
1
2
5
3
4
1
2
3
4
5
6
1
2 5
3
41
2
3
4
5
6
1
2
3
4
5
Aditya Engineering College (A)
MST: Divisive Hierarchical Clustering
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
• Build MST (Minimum Spanning Tree)
– Start with a tree that consists of any point
– In successive steps, look for the closest pair of points (p, q) such that
one point (p) is in the current tree but the other (q) is not
– Add q to the tree and put an edge between p and q
Aditya Engineering College (A)
MST: Divisive Hierarchical Clustering
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
• Use MST for constructing hierarchy of clusters
Aditya Engineering College (A)
Hierarchical Clustering: Time and Space requirements
• O(N2) space since it uses the proximity matrix.
– N is the number of points.
• O(N3) time in many cases
– There are N steps and at each step the size, N2,
proximity matrix must be updated and searched
– Complexity can be reduced to O(N2 log(N) ) time
with some cleverness
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
Hierarchical Clustering: Problems and Limitations
• Once a decision is made to combine two clusters,
it cannot be undone
• No global objective function is directly minimized
• Different schemes have problems with one or
more of the following:
– Sensitivity to noise and outliers
– Difficulty handling clusters of different sizes and non-
globular shapes
– Breaking large clusters
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
25-04-2020
Aditya Engineering College (A)
Part-2 will cover DBSCAN Clustering
Algorithm
Cluster Analysis
A K Chakravarthy.,Asst.Prof,Dept.of
IT
24-04-2020

More Related Content

What's hot

Data Structures and Algorithm - Week 5 - AVL Trees
Data Structures and Algorithm - Week 5 - AVL TreesData Structures and Algorithm - Week 5 - AVL Trees
Data Structures and Algorithm - Week 5 - AVL TreesFerdin Joe John Joseph PhD
 
Data Structures and Algorithm - Week 6 - Red Black Trees
Data Structures and Algorithm - Week 6 - Red Black TreesData Structures and Algorithm - Week 6 - Red Black Trees
Data Structures and Algorithm - Week 6 - Red Black TreesFerdin Joe John Joseph PhD
 
On the Reasonableness of TPACK as an Implementation and Evaluation Framework
On the Reasonableness of TPACK as an Implementation and Evaluation FrameworkOn the Reasonableness of TPACK as an Implementation and Evaluation Framework
On the Reasonableness of TPACK as an Implementation and Evaluation Frameworkroycekimmons
 
K means clustering
K means clusteringK means clustering
K means clusteringkeshav goyal
 
Data Structures and Algorithm - Week 11 - Algorithm Analysis
Data Structures and Algorithm - Week 11 - Algorithm AnalysisData Structures and Algorithm - Week 11 - Algorithm Analysis
Data Structures and Algorithm - Week 11 - Algorithm AnalysisFerdin Joe John Joseph PhD
 
Types of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithmsTypes of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithmsPrashanth Guntal
 
Term Frequency and its Variants in Retrieval Models
Term Frequency and its Variants in Retrieval ModelsTerm Frequency and its Variants in Retrieval Models
Term Frequency and its Variants in Retrieval ModelsVenkatesh Vinayakarao
 
Data Structures and Algorithm - Week 9 - Search Algorithms
Data Structures and Algorithm - Week 9 - Search AlgorithmsData Structures and Algorithm - Week 9 - Search Algorithms
Data Structures and Algorithm - Week 9 - Search AlgorithmsFerdin Joe John Joseph PhD
 
DATA MINING:Clustering Types
DATA MINING:Clustering TypesDATA MINING:Clustering Types
DATA MINING:Clustering TypesAshwin Shenoy M
 
classes & objects introduction
classes & objects introductionclasses & objects introduction
classes & objects introductionKumar
 
Introduction to Machine learning ppt
Introduction to Machine learning pptIntroduction to Machine learning ppt
Introduction to Machine learning pptshubhamshirke12
 
Data structures and algorithm analysis in java
Data structures and algorithm analysis in javaData structures and algorithm analysis in java
Data structures and algorithm analysis in javaMuhammad Aleem Siddiqui
 
3.5 model based clustering
3.5 model based clustering3.5 model based clustering
3.5 model based clusteringKrish_ver2
 

What's hot (16)

Data Structures and Algorithm - Week 5 - AVL Trees
Data Structures and Algorithm - Week 5 - AVL TreesData Structures and Algorithm - Week 5 - AVL Trees
Data Structures and Algorithm - Week 5 - AVL Trees
 
Data Structures and Algorithm - Week 6 - Red Black Trees
Data Structures and Algorithm - Week 6 - Red Black TreesData Structures and Algorithm - Week 6 - Red Black Trees
Data Structures and Algorithm - Week 6 - Red Black Trees
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Dataa miining
Dataa miiningDataa miining
Dataa miining
 
On the Reasonableness of TPACK as an Implementation and Evaluation Framework
On the Reasonableness of TPACK as an Implementation and Evaluation FrameworkOn the Reasonableness of TPACK as an Implementation and Evaluation Framework
On the Reasonableness of TPACK as an Implementation and Evaluation Framework
 
K means clustering
K means clusteringK means clustering
K means clustering
 
Week 1 - Data Structures and Algorithms
Week 1 - Data Structures and AlgorithmsWeek 1 - Data Structures and Algorithms
Week 1 - Data Structures and Algorithms
 
Data Structures and Algorithm - Week 11 - Algorithm Analysis
Data Structures and Algorithm - Week 11 - Algorithm AnalysisData Structures and Algorithm - Week 11 - Algorithm Analysis
Data Structures and Algorithm - Week 11 - Algorithm Analysis
 
Types of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithmsTypes of clustering and different types of clustering algorithms
Types of clustering and different types of clustering algorithms
 
Term Frequency and its Variants in Retrieval Models
Term Frequency and its Variants in Retrieval ModelsTerm Frequency and its Variants in Retrieval Models
Term Frequency and its Variants in Retrieval Models
 
Data Structures and Algorithm - Week 9 - Search Algorithms
Data Structures and Algorithm - Week 9 - Search AlgorithmsData Structures and Algorithm - Week 9 - Search Algorithms
Data Structures and Algorithm - Week 9 - Search Algorithms
 
DATA MINING:Clustering Types
DATA MINING:Clustering TypesDATA MINING:Clustering Types
DATA MINING:Clustering Types
 
classes & objects introduction
classes & objects introductionclasses & objects introduction
classes & objects introduction
 
Introduction to Machine learning ppt
Introduction to Machine learning pptIntroduction to Machine learning ppt
Introduction to Machine learning ppt
 
Data structures and algorithm analysis in java
Data structures and algorithm analysis in javaData structures and algorithm analysis in java
Data structures and algorithm analysis in java
 
3.5 model based clustering
3.5 model based clustering3.5 model based clustering
3.5 model based clustering
 

Similar to Clustering part 1

Unsupervised learning clustering
Unsupervised learning clusteringUnsupervised learning clustering
Unsupervised learning clusteringArshad Farhad
 
26-Clustering MTech-2017.ppt
26-Clustering MTech-2017.ppt26-Clustering MTech-2017.ppt
26-Clustering MTech-2017.pptvikassingh569137
 
MODULE 4_ CLUSTERING.pptx
MODULE 4_ CLUSTERING.pptxMODULE 4_ CLUSTERING.pptx
MODULE 4_ CLUSTERING.pptxnikshaikh786
 
Data mining Techniques
Data mining TechniquesData mining Techniques
Data mining TechniquesSulman Ahmed
 
Unsupervised learning Modi.pptx
Unsupervised learning Modi.pptxUnsupervised learning Modi.pptx
Unsupervised learning Modi.pptxssusere1fd42
 
machine learning - Clustering in R
machine learning - Clustering in Rmachine learning - Clustering in R
machine learning - Clustering in RSudhakar Chavan
 
iiit delhi unsupervised pdf.pdf
iiit delhi unsupervised pdf.pdfiiit delhi unsupervised pdf.pdf
iiit delhi unsupervised pdf.pdfVIKASGUPTA127897
 
algoritma klastering.pdf
algoritma klastering.pdfalgoritma klastering.pdf
algoritma klastering.pdfbintis1
 
Poggi analytics - clustering - 1
Poggi   analytics - clustering - 1Poggi   analytics - clustering - 1
Poggi analytics - clustering - 1Gaston Liberman
 
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...ABINASHPADHY6
 
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptxMACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptxVijayalakshmi171563
 

Similar to Clustering part 1 (20)

Part 2
Part 2Part 2
Part 2
 
Unsupervised learning clustering
Unsupervised learning clusteringUnsupervised learning clustering
Unsupervised learning clustering
 
26-Clustering MTech-2017.ppt
26-Clustering MTech-2017.ppt26-Clustering MTech-2017.ppt
26-Clustering MTech-2017.ppt
 
kmean clustering
kmean clusteringkmean clustering
kmean clustering
 
MODULE 4_ CLUSTERING.pptx
MODULE 4_ CLUSTERING.pptxMODULE 4_ CLUSTERING.pptx
MODULE 4_ CLUSTERING.pptx
 
Data Mining Lecture_8(a).pptx
Data Mining Lecture_8(a).pptxData Mining Lecture_8(a).pptx
Data Mining Lecture_8(a).pptx
 
Data mining Techniques
Data mining TechniquesData mining Techniques
Data mining Techniques
 
Hierachical clustering
Hierachical clusteringHierachical clustering
Hierachical clustering
 
Unsupervised learning Modi.pptx
Unsupervised learning Modi.pptxUnsupervised learning Modi.pptx
Unsupervised learning Modi.pptx
 
Clusteryanam
ClusteryanamClusteryanam
Clusteryanam
 
machine learning - Clustering in R
machine learning - Clustering in Rmachine learning - Clustering in R
machine learning - Clustering in R
 
Machine Learning - Clustering
Machine Learning - ClusteringMachine Learning - Clustering
Machine Learning - Clustering
 
Clustering.pptx
Clustering.pptxClustering.pptx
Clustering.pptx
 
Clustering on DSS
Clustering on DSSClustering on DSS
Clustering on DSS
 
Hierarchical Clustering
Hierarchical ClusteringHierarchical Clustering
Hierarchical Clustering
 
iiit delhi unsupervised pdf.pdf
iiit delhi unsupervised pdf.pdfiiit delhi unsupervised pdf.pdf
iiit delhi unsupervised pdf.pdf
 
algoritma klastering.pdf
algoritma klastering.pdfalgoritma klastering.pdf
algoritma klastering.pdf
 
Poggi analytics - clustering - 1
Poggi   analytics - clustering - 1Poggi   analytics - clustering - 1
Poggi analytics - clustering - 1
 
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...
log6kntt4i4dgwfwbpxw-signature-75c4ed0a4b22d2fef90396cdcdae85b38911f9dce0924a...
 
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptxMACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
MACHINE LEARNING - ENTROPY & INFORMATION GAINpptx
 

Recently uploaded

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 

Recently uploaded (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 

Clustering part 1

  • 1. Aditya Engineering College (A) Data Warehousing & Data Mining By A.K.Chakravarthy Assistant Professor Dept of Information Technology Aditya Engineering College(A) Surampalem.
  • 2. What is Cluster Analysis? • Finding groups of objects such that the objects in a group will be similar (or related) to one another and different from (or unrelated to) the objects in other groups Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT Inter-cluster distances are maximized Intra-cluster distances are minimized Aditya Engineering College (A) 24-04-2020
  • 3. Applications • Informational Retrieval • Biology • Climate • Business • Lot more.. Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 Aditya Engineering College (A)
  • 4. What is not Cluster Analysis? • Simple segmentation – Dividing students into different registration groups alphabetically, by last name • Results of a query – Groupings are a result of an external specification – Clustering is a grouping of objects based on the data • Supervised classification – Have class label information • Association Analysis – Local vs. global connections Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 Aditya Engineering College (A)
  • 5. Notion of a Cluster can be Ambiguous Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 How many clusters? Four ClustersTwo Clusters Six Clusters Aditya Engineering College (A)
  • 6. Types of Clusterings • A clustering is a set of clusters • Important distinction between hierarchical and partitional sets of clusters • Partitional Clustering – A division of data objects into non-overlapping subsets (clusters) such that each data object is in exactly one subset • Hierarchical clustering – A set of nested clusters organized as a hierarchical tree Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 Aditya Engineering College (A)
  • 7. Partitional Clustering Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 Original Points A Partitional Clustering Aditya Engineering College
  • 8. Hierarchical Clustering Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 p4 p1 p3 p2 p4 p1 p3 p2 Traditional Hierarchical Clustering Non-traditional Hierarchical Clustering Aditya Engineering College (A)
  • 9. Other Distinctions Between Sets of Clusters • Exclusive versus non-exclusive – In non-exclusive clusterings, points may belong to multiple clusters. – Can represent multiple classes or ‘border’ points • Fuzzy versus non-fuzzy – In fuzzy clustering, a point belongs to every cluster with some weight between 0 and 1 – Weights must sum to 1 – Probabilistic clustering has similar characteristics • Partial versus complete – In some cases, we only want to cluster some of the data • Heterogeneous versus homogeneous – Clusters of widely different sizes, shapes, and densities Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 Aditya Engineering College (A)
  • 10. Types of Clusters • Well-separated clusters • Center-based clusters • Contiguous clusters • Density-based clusters • Property or Conceptual • Described by an Objective Function Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 Aditya Engineering College (A)
  • 11. Types of Clusters: Well-Separated • Well-Separated Clusters: – A cluster is a set of points such that any point in a cluster is closer (or more similar) to every other point in the cluster than to any point not in the cluster. Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 3 well-separated clusters Aditya Engineering College (A)
  • 12. Types of Clusters: Center-Based • Center-based – A cluster is a set of objects such that an object in a cluster is closer (more similar) to the “center” of a cluster, than to the center of any other cluster – The center of a cluster is often a centroid, the average of all the points in the cluster, or a medoid, the most “representative” point of a cluster Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 4 center-based clusters ADITYA ENGINEERING COLLEGE(A)
  • 13. Types of Clusters: Contiguity-Based • Contiguous Cluster (Nearest neighbor or Transitive) – A cluster is a set of points such that a point in a cluster is closer (or more similar) to one or more other points in the cluster than to any point not in the cluster. Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 8 contiguous clusters ADITYA ENGINEERING COLLEGE(A)
  • 14. Types of Clusters: Density-Based • Density-based – A cluster is a dense region of points, which is separated by low- density regions, from other regions of high density. – Used when the clusters are irregular or intertwined, and when noise and outliers are present. Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 6 density-based clusters ADITYA ENGINEERING COLLEGE(A)
  • 15. Types of Clusters: Conceptual Clusters • Shared Property or Conceptual Clusters – Finds clusters that share some common property or represent a particular concept. . Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 2 Overlapping Circles ADITYA ENGINEERING COLLEGE(A)
  • 16. Types of Clusters: Objective Function • Clusters Defined by an Objective Function – Finds clusters that minimize or maximize an objective function. – Enumerate all possible ways of dividing the points into clusters and evaluate the `goodness' of each potential set of clusters by using the given objective function. (NP Hard) – Can have global or local objectives. • Hierarchical clustering algorithms typically have local objectives • Partitional algorithms typically have global objectives – A variation of the global objective function approach is to fit the data to a parameterized model. • Parameters for the model are determined from the data. • Mixture models assume that the data is a ‘mixture' of a number of statistical distributions. Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 ADITYA ENGINEERING COLLEGE(A)
  • 17. Clustering Algorithms • K-means and its variants • Hierarchical clustering • Density-based clustering Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 ADITYA ENGINEERING COLLEGE(A)
  • 18. K-means Clustering • Partitional clustering approach • Number of clusters, K, must be specified • Each cluster is associated with a centroid (center point) • Each point is assigned to the cluster with the closest centroid • The basic algorithm is very simple Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 ADITYA ENGINEERING COLLEGE(A)
  • 19. Example of K-means Clustering Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 1 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 3 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 4 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 6 Aditya Engineering College (A)
  • 20. K-means Clustering – Details • Initial centroids are often chosen randomly. – Clusters produced vary from one run to another. • The centroid is (typically) the mean of the points in the cluster. • ‘Closeness’ is measured by Euclidean distance, cosine similarity, correlation, etc. • K-means will converge for common similarity measures mentioned above. • Most of the convergence happens in the first few iterations. – Often the stopping condition is changed to ‘Until relatively few points change clusters’ • Complexity is O( n * K * I * d ) – n = number of points, K = number of clusters, I = number of iterations, d = number of attributes Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 ADITYA ENGINEERING COLLEGE(A)
  • 21. Evaluating K-means Clusters    K i Cx i i xmdistSSE 1 2 ),( Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 • Most common measure is Sum of Squared Error (SSE) – For each point, the error is the distance to the nearest cluster – To get SSE, we square these errors and sum them. – x is a data point in cluster Ci and mi is the representative point for cluster Ci • can show that mi corresponds to the center (mean) of the cluster – Given two sets of clusters, we prefer the one with the smallest error – One easy way to reduce SSE is to increase K, the number of clusters • A good clustering with smaller K can have a lower SSE than a poor clustering with higher K ADITYA ENGINEERING COLLEGE(A)
  • 22. Two different K-means Clusterings Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Sub-optimal Clustering -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Optimal Clustering Original Points ADITYA ENGINEERING COLLEGE(A)
  • 23. Limitations of K-means • K-means has problems when clusters are of differing – Sizes – Densities – Non-globular shapes • K-means has problems when the data contains outliers. Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 ADITYA ENGINEERING COLLEGE(A)
  • 24. Limitations of K-means: Differing Sizes Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Original Points K-means (3 Clusters) Aditya Engineering College (A)
  • 25. Limitations of K-means: Differing Density Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Original Points K-means (3 Clusters) Aditya Engineering College (A)
  • 26. Limitations of K-means: Non-globular Shapes Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Original Points K-means (2 Clusters) Aditya Engineering College (A)
  • 27. Overcoming K-means Limitations Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Original Points K-means Clusters One solution is to use many clusters. Find parts of clusters, but need to put together. Aditya Engineering College (A)
  • 28. Overcoming K-means Limitations Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Original Points K-means Clusters Aditya Engineering College (A)
  • 29. Overcoming K-means Limitations Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Original Points K-means Clusters Aditya Engineering College (A)
  • 30. Importance of Choosing Initial Centroids Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 6 Aditya Engineering College (A)
  • 31. Importance of Choosing Initial Centroids Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 1 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 3 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 4 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 0 0.5 1 1.5 2 2.5 3 x y Iteration 6 Aditya Engineering College (A)
  • 32. Solutions to Initial Centroids Problem • Multiple runs – Helps, but probability is not on your side • Sample and use hierarchical clustering to determine initial centroids • Select more than k initial centroids and then select among these initial centroids – Select most widely separated • Postprocessing • Generate a larger number of clusters and then perform a hierarchical clustering • Bisecting K-means – Not as susceptible to initialization issues Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 33. Pre-processing and Post-processing • Pre-processing – Normalize the data – Eliminate outliers • Post-processing – Eliminate small clusters that may represent outliers – Split ‘loose’ clusters, i.e., clusters with relatively high SSE – Merge clusters that are ‘close’ and that have relatively low SSE – Can use these steps during the clustering process • ISODATA Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 34. Bisecting K-means • Bisecting K-means algorithm – Variant of K-means that can produce a partitional or a hierarchical clustering Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 CLUTO: http://glaros.dtc.umn.edu/gkhome/cluto/cluto/overview Aditya Engineering College (A)
  • 35. Bisecting K-means Example Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 36. Hierarchical Clustering • Produces a set of nested clusters organized as a hierarchical tree • Can be visualized as a dendrogram – A tree like diagram that records the sequences of merges or splits Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 1 3 2 5 4 6 0 0.05 0.1 0.15 0.2 1 2 3 4 5 6 1 2 3 4 5 Aditya Engineering College (A)
  • 37. Hierarchical Clustering • Two main types of hierarchical clustering – Agglomerative: • Start with the points as individual clusters • At each step, merge the closest pair of clusters until only one cluster (or k clusters) left – Divisive: • Start with one, all-inclusive cluster • At each step, split a cluster until each cluster contains an individual point (or there are k clusters) • Traditional hierarchical algorithms use a similarity or distance matrix – Merge or split one cluster at a time Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 38. Strengths of Hierarchical Clustering • Do not have to assume any particular number of clusters – Any desired number of clusters can be obtained by ‘cutting’ the dendrogram at the proper level • They may correspond to meaningful taxonomies – Example in biological sciences (e.g., animal kingdom, phylogeny reconstruction, …) Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 39. Agglomerative Clustering Algorithm • Most popular hierarchical clustering technique • Basic algorithm is straightforward 1. Compute the proximity matrix 2. Let each data point be a cluster 3. Repeat 4. Merge the two closest clusters 5. Update the proximity matrix 6. Until only a single cluster remains • Key operation is the computation of the proximity of two clusters – Different approaches to defining the distance between clusters distinguish the different algorithms Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 40. How to Define Inter-Cluster Distance Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 p1 p3 p5 p4 p2 p1 p2 p3 p4 p5 . . . . . . Similarity?  MIN  MAX  Group Average  Distance Between Centroids  Other methods driven by an objective function – Ward’s Method uses squared error Proximity Matrix Aditya Engineering College (A)
  • 41. How to Define Inter-Cluster Similarity Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 p1 p3 p5 p4 p2 p1 p2 p3 p4 p5 . . . . . . Proximity Matrix  MIN  MAX  Group Average  Distance Between Centroids  Other methods driven by an objective function – Ward’s Method uses squared error Aditya Engineering College (A)
  • 42. How to Define Inter-Cluster Similarity Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 p1 p3 p5 p4 p2 p1 p2 p3 p4 p5 . . . . . . Proximity Matrix  MIN  MAX  Group Average  Distance Between Centroids  Other methods driven by an objective function – Ward’s Method uses squared error Aditya Engineering College (A)
  • 43. How to Define Inter-Cluster Similarity Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 p1 p3 p5 p4 p2 p1 p2 p3 p4 p5 . . . . . . Proximity Matrix  MIN  MAX  Group Average  Distance Between Centroids  Other methods driven by an objective function – Ward’s Method uses squared error Aditya Engineering College (A)
  • 44. How to Define Inter-Cluster Similarity Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 p1 p3 p5 p4 p2 p1 p2 p3 p4 p5 . . . . . . Proximity Matrix  MIN  MAX  Group Average  Distance Between Centroids  Other methods driven by an objective function – Ward’s Method uses squared error   Aditya Engineering College (A)
  • 45. MIN or Single Link Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 • Proximity of two clusters is based on the two closest points in the different clusters – Determined by one pair of points, i.e., by one link in the proximity graph • Example: Distance Matrix: Aditya Engineering College (A)
  • 46. Hierarchical Clustering: MIN Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Nested Clusters Dendrogram 1 2 3 4 5 6 1 2 3 4 5 Aditya Engineering College (A)
  • 47. Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 48. Strength of MIN Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Original Points Six Clusters • Can handle non-elliptical shapes Aditya Engineering College (A)
  • 49. Limitations of MIN Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Original Points Two Clusters • Sensitive to noise and outliers Three Clusters Aditya Engineering College (A)
  • 50. MAX or Complete Linkage • Proximity of two clusters is based on the two most distant points in the different clusters – Determined by all pairs of points in the two clusters Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Distance Matrix: Aditya Engineering College (A)
  • 51. Hierarchical Clustering: MAX Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Nested Clusters Dendrogram 1 2 3 4 5 6 1 2 5 3 4 Aditya Engineering College (A)
  • 52. Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 53. Strength of MAX Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Original Points Two Clusters • Less susceptible to noise and outliers Aditya Engineering College (A)
  • 54. Limitations of MAX Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Original Points Two Clusters • Tends to break large clusters • Biased towards globular clusters Aditya Engineering College (A)
  • 55. Group Average • Proximity of two clusters is the average of pairwise proximity between points in the two clusters. • Need to use average connectivity for scalability since total proximity favors large clusters Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 ||Cluster||Cluster )p,pproximity( )Cluster,Clusterproximity( ji Clusterp Clusterp ji ji jj ii      Distance Matrix: Aditya Engineering College (A)
  • 56. Hierarchical Clustering: Group Average Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Nested Clusters Dendrogram 1 2 3 4 5 6 1 2 5 3 4 Aditya Engineering College (A)
  • 57. Hierarchical Clustering: Group Average • Compromise between Single and Complete Link • Strengths – Less susceptible to noise and outliers • Limitations – Biased towards globular clusters Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 58. Cluster Similarity: Ward’s Method • Similarity of two clusters is based on the increase in squared error when two clusters are merged – Similar to group average if distance between points is distance squared • Less susceptible to noise and outliers • Biased towards globular clusters • Hierarchical analogue of K-means – Can be used to initialize K-means Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 59. Hierarchical Clustering: Comparison Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Group Average Ward’s Method 1 2 3 4 5 6 1 2 5 3 4 MIN MAX 1 2 3 4 5 6 1 2 5 3 4 1 2 3 4 5 6 1 2 5 3 41 2 3 4 5 6 1 2 3 4 5 Aditya Engineering College (A)
  • 60. MST: Divisive Hierarchical Clustering Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 • Build MST (Minimum Spanning Tree) – Start with a tree that consists of any point – In successive steps, look for the closest pair of points (p, q) such that one point (p) is in the current tree but the other (q) is not – Add q to the tree and put an edge between p and q Aditya Engineering College (A)
  • 61. MST: Divisive Hierarchical Clustering Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 • Use MST for constructing hierarchy of clusters Aditya Engineering College (A)
  • 62. Hierarchical Clustering: Time and Space requirements • O(N2) space since it uses the proximity matrix. – N is the number of points. • O(N3) time in many cases – There are N steps and at each step the size, N2, proximity matrix must be updated and searched – Complexity can be reduced to O(N2 log(N) ) time with some cleverness Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 63. Hierarchical Clustering: Problems and Limitations • Once a decision is made to combine two clusters, it cannot be undone • No global objective function is directly minimized • Different schemes have problems with one or more of the following: – Sensitivity to noise and outliers – Difficulty handling clusters of different sizes and non- globular shapes – Breaking large clusters Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 25-04-2020 Aditya Engineering College (A)
  • 64. Part-2 will cover DBSCAN Clustering Algorithm Cluster Analysis A K Chakravarthy.,Asst.Prof,Dept.of IT 24-04-2020