Documente Academic
Documente Profesional
Documente Cultură
CLUSTER ANALYSIS?
1. Cluster: a collection of data objects
a.
Similar to one another within the same cluster
b.
Dissimilar to the objects in other clusters
2. Cluster analysis
a.
Grouping a set of data objects into clusters
3. Clustering is unsupervised classification: no predefined classes
4. Typical applications
a.
As a stand-alone tool to get insight into data distribution
b.
As a preprocessing step for other algorithms
APPLICATIONS OF CLUSTERING
1.
Pattern Recognition
2.
Spatial Data Analysis
a.
create thematic maps in GIS by clustering feature spaces
b.
detect spatial clusters and explain them in spatial data mining
3.
Image Processing
4.
Economic Science (especially market research)
5.
WWW
a.
Document classification
b.
Cluster Weblog data to discover groups of similar access patterns
6.
Marketing: Help marketers discover distinct groups in their customer bases, and then
use this knowledge to develop targeted marketing programs
7.
Land use: Identification of areas of similar land use in an earth observation
database
8.
Insurance: Identifying groups of motor insurance policy holders with a high
average claim cost
9.
City-planning: Identifying groups of houses according to their house type, value, and
geographical location
10.
Earth-quake studies: Observed earth quake epicenters should be clustered along
continent faults
REQUIREMENTS OF CLUSTERING
1.Scalability: Many clustering algorithms work well on small data sets containing
fewer than several hundred data objects; however, a large database may contain
millions of objects. Clustering on a sample of a given large data set may lead to
biased results
2.Ability to deal with different types of attributes: Many algorithms are designed to
cluster interval-based (numerical) data. However, applications may require
clustering other types of data, such as binary, categorical (nominal), and ordinal
data, or mixtures of these data types.
3.Discovery of clusters with arbitrary shape: Many clustering algorithms determine
clusters based on Euclidean or Manhattan distance measures. Algorithms based on such
distance measures tend to find spherical clusters with similar size and density.
4.Minimal requirements for domain knowledge to determine input parameters:
Many clustering algorithms require users to input certain parameters in cluster analysis
(such as the number of desired clusters). The clustering results can be quite sensitive to
input parameters.
5.Able to deal with noise and outliers: Most real-world databases contain outliers or
missing, unknown, or erroneous data. Some clustering algorithms are sensitive to such
data and may lead to clusters of poor quality
6.Insensitive to order of input records: Some clustering algorithms cannot incorporate
newly inserted data (i.e., database updates) into existing clustering structures and,
instead, must determine a new clustering from scratch. Some clustering algorithms are
sensitive to the order of input data.
7.High dimensionality: A database or a data warehouse can contain several dimensions
or attributes. Many clustering algorithms are good at handling low-dimensional data,
involving only two to three dimensions
8.Constraint-based clustering: Real-world applications may need to perform
clustering under various kinds of constraints. Suppose that your job is to choose the
locations for a given number of new automatic banking machines (ATMs) in a city.
9. Interpretability and usability: Users expect clustering results to be interpretable,
comprehensible, and usable. That is, clustering may need to be tied to specific semantic
Interpretations
and applications.
1.
Interval-scaled variables:
2.
Binary variables:
3.
4.
INTERVAL-SCALED VARIABLES
1)
Standardize data
a)
sf 1
n (| x1 f m f | | x2 f m f | ... | xnf m f |)
where
2)
xif m f
zif s
f
Using mean absolute deviation is more robust than using standard deviation
1)
where i = (xi1, xi2, , xip) and j = (xj1, xj2, , xjp) are two pdimensional data objects, and q is a positive integer
2)
If q = 1, d is Manhattan distance
d (i, j) | x x | | x x | ... | x x |
i1
j1
i2
j2
ip
jp
If q = 2, d is Euclidean distance:
2
2
2
Properties d (i, j) (| xi1 x j1 | | xi 2 x j 2 | ... | xip x jp | )
i) d(i,j) 0 Distance is a nonnegative number.
ii) d(i,i) = 0 The distance of an object to itself is 0.
iii) d(i,j) = d(j,i) The distance of an object to itself is 0.
iv) d(i,j) d(i,k) + d(k,j)
BINARY VARIABLES
Object j
1
Object i
sum
sum
a+b
c +d
a+c
b+d
d (i, j)
bc
a b c d
d (i, j) b c
a bc
DISSIMILARITY BETWEEN BINARY VARIABLES
Name
Gender
Fever
Cough
Test-1
Test-2
Test-3
Test-4
Jack
Mary
Jim
1.
2.
3.
d ( jack , mary ) =
0+1
=0.33
2+ 0 +1
d ( jack , jim ) =
1+1
=0.67
1 +1 + 1
d ( jim , mary ) =
1+2
1+ 1 + 2
=0.75
CATEGORICAL VARIABLES
1.
A generalization of the binary variable in that it can take more than 2 states,
a.
e.g., red, yellow, blue, green
2.
Method 1: Simple matching
a.
d (i, j) p pm
3.
ORDINAL VARIABLES
map the range of each variable onto [0, 1] by replacing i-th object in the f-th
variable by
rif {1,. ,M f}
zif
rif 1
M f 1
RATIO-SCALED VARIABLE
Methods:
yif = log(xif)
pf 1 ij( f )dij( f )
d (i, j)
pf 1 ij( f )
is binary or nominal:
dij(f) = 0
= 1 other wise.
is ordinal or ratio-scaled
r 1
M 1
A CATEGORIZATION OF MAJOR CLUSTERING METHODS
1.
zif
if
2.
5.
Model-based: A model is hypothesized for each of the clusters and the idea is to find the
best fit of that model to each other
A model-based algorithm may locate clusters by constructing a density function that reflects
the spatial distribution of the data points. It also leads to a way of automatically determining
the number of
clusters based on standard statistics, taking noise or outliers into account and thus yielding
robust clustering methods.
PARTITIONING METHODS
Compute seed points as the centroids of the clusters of the current partition (the
centroid is the center, i.e., mean point, of the cluster)
Assign each object to the cluster with the nearest seed point
Go back to Step 2, stop when no more new assignment
Comment: Often terminates at a local optimum. The global optimum may be found
using techniques such as: deterministic annealing and genetic algorithms
Weakness
1.
Applicable only when mean is defined, then what about categorical data?
2.
Need to specify k, the number of clusters, in advance
3.
4.
b. Dissimilarity calculations
c. Strategies to calculate cluster means
Handling
a.
d.
2.
point, medoids can be used, which is the most centrally located object in a cluster.
The K-Medoids Clustering Method
data sets
b.
For each pair of non-selected object h and selected object i, calculate the total
swapping cost TCih
For each pair of i and h,
c.
i.
i.
3.
2.
3.
It draws multiple samples of the data set, applies PAM on each sample, and gives the
best clustering as the output
Strength: deals with larger data sets than PAM
4. Weakness:
a. Efficiency depends on the sample size
b. A good clustering based on samples will not necessarily represent a good
clustering of the whole data set if the sample is biased
Hierarchical Methods
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
1.
2.
3.
4.
BIRCH (1996)
Birch: Balanced Iterative Reducing and Clustering using Hierarchies, by Zhang,
Ramakrishnan, Livny (SIGMOD96)
Incrementally construct a CF (Clustering Feature) tree, a hierarchical data structure
for multiphase clustering
Phase 1: scan DB to build an initial in-memory CF tree (a multi-level
compression of the data that tries to preserve the inherent clustering structure of
the data)
Phase 2: use an arbitrary clustering algorithm to cluster the leaf nodes of the CF-tree
Scales linearly: finds a good clustering with a single scan and improves the quality
with a few additional scans
Weakness: handles only numeric data, and sensitive to the order of the data record.
Clustering Feature Vector
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 the statistical point of view.
registers crucial measurements for computing cluster and utilizes storage efficiently
A CF tree is a height-balanced tree that stores the clustering features for a
hierarchical clustering
ROCKs concepts of neighbors and links are illustrated in the following example,
where the similarity between two points or transactions, Ti and Tj, is defined with
the Jaccard coefficient as
Chameleon: A Hierarchical Clustering Algorithm
Using Dynamic Modeling
Chameleon is a hierarchical clustering algorithm that uses dynamic modeling to
determine the similarity between pairs of clusters. It was derived based on the
observed weaknesses of two hierarchical clustering algorithms: ROCK and CURE.
ROCK and related schemes emphasize cluster interconnectivity while ignoring
information regarding cluster proximity. CURE and related schemes consider cluster
proximity yet ignore cluster Interconnectivity.
1.
2.
Two clusters are merged only if the interconnectivity and closeness (proximity)
between two clusters are high relative to the internal interconnectivity of the
clusters and closeness of items within the clusters
Cure ignores information about interconnectivity of the objects, Rock ignores
information about the closeness of two clusters
two-phase algorithm:
1.
2.
DENSITY-BASED METHODS:
Clustering based on density (local cluster criterion), such as density-connected points
1.
Major features:
a.
Discover clusters of arbitrary shape
b.
Handle noise
c.
One scan
d.
Need density parameters as termination condition
2.
Several interesting studies:
a.
DBSCAN: Ester, et al. (KDD96)
b.
OPTICS: Ankerst, et al (SIGMOD99).
c.
DENCLUE: Hinneburg & D. Keim (KDD98)
d.
CLIQUE: Agrawal, et al. (SIGMOD98)
1. Core object (CO)object with at least M objects within a radius E-neighborhood
2.
3.
4.