You are on page 1of 10

1.

Introduction

2. Distributed clustering :

Distributed Clustering assumes that the objects to be clustered reside on different sites. Instead of
transmitting all objects to a central site (also denoted as server) where we can apply standard
clustering algorithms to analyze the data, the data are clustered independently on the different
local sites(also denoted as clients). In a subsequent step, the central site tries to establish a global
clustering based on the local models, i.e. the representatives. This is a very difficult step as there
might exist dependencies between objects located on different sites which are not taken into
consideration by the creation of the local models. In contrast to a central clustering of the
complete dataset, the central clustering of the local models can be carried out much faster.
Distributed Clustering is carried out on two different levels, i.e. the local level and the global
level (cf. Figure 1).On the local level, all sites carry out a clustering independently from each
other. After having completed the clustering, a local model is determined which should reflect an
optimum trade-off between complexity and accuracy. Our proposed local models consist of a set
of representatives for each locally found cluster. Each representative is a concrete object from
the objects stored on the local site. Furthermore, we augment each representative with a suitable
ε−range value. Thus, a representative is a good approximation for all objects residing on the
corresponding local site which are contained in the ε−range around this representative. Next the
local model is transferred to a central site, where the local models are merged in order to form a
global model. The global model is created by analyzing the local representatives. This analysis is
similar to a new clustering of the representatives with suitable global clustering parameters. To
each local representative a global cluster-identifier is assigned. This resulting global clustering is
sent to all local sites. If a local object belongs to the ε-neighborhood of a global representative,
the cluster-identifier from this representative is assigned to the local object. Thus, we can achieve
that each site has the same information as if their data were clustered on a global site, together
with the data of all the other sites.

To sum up, distributed clustering consists of four differ-ent steps (cf. Figure 1):•Local
clustering•Determination of a local model •Determination of a global model, which is based on
all lo-cal models•Updating of all local models
Figure 1: Distributed Clustering

2.1. Communication model:

1.1. Modèle de communication :

Circulaire, hiérarchique, p2p ????????,,,

Peer-to-Peer (P2P) :

3. Algorithme distribué

3.1 Hierarchical methods :

Hierarchical algorithms create a hierarchical decomposition of D. The hierarchical


decomposition is represented by a dendrogram, a tree that iteratively splits D into smaller subsets
until each subset consists of only one object. In such a hierarchy, each node of the tree represents
a cluster of D. The d endrogram can either be created from the leaves up to the root
(agglomerative approach) or from the root down to the leaves (divisive approach) by merging or
dividing clusters at each step. In contrast to partitioning algorithms, hierarchical algorithms do
not need k as an input. However, a termination condition has to be defined indicating when the
merge or division process should be terminated. One example of a termination condition in the
agglomerative approach is the critical distance D min between all the clusters of Q. So far, the
main problem with hierarchical clustering algorithms has been the difficulty of deriving
appropriate parameters for the termination condition, e.g. a value of D min which is small
enough to separate all "natural" clusters and, at the same time large enough such that no cluster is
split into two parts. Recently, in the area of signal processing the hierarchical algorithm Ej
cluster has been presented (Garcfa,Fdez-Valdivia, Cortijo & Molina 1994) automatically
deriving a termination condition. Its key idea is that two points be-long to the same cluster if you
can walk from the first point to the second one by a "sufficiently small" step. Ej cluster follows
the divisive approach. It does not require any input of domain knowledge. Furthermore,
experiments show that it is very effective in discovering non-convex clusters. How-ever, the
computational cost of Ej cluster is O(n2) due to the distance calculation for each pair of points.
This is accept-able for applications such as character recognition with moderate values for n, but
it is prohibitive for applications on large databases. Jain (1988) explores a density based
approach to identify clusters in k-dimensional point sets. The data set is partitioned into a
number of non overlapping cells and histograms are constructed. Cells with relatively high
frequency counts of points are the potential cluster centers and the boundaries between clusters
fall in the "valleys" of the histogram. This method has the capability of identifying clusters of
any shape. However, the space and run-time requirements for storing and searching
multidimensional histograms can been ormous. Even if the space and run-time requirements are
optimized, the performance of such an approach crucially depends on the size of the cells.

3.2 Density methods (DBSCAN: Density Based Spatial Clustering of Applications with
Nois):

In this section, we present the algorithm DBSCAN (Density Based Spatial Clustering of
Applications with Noise) which is designed to discover the clusters and the noise in a spatial
database according to definitions 5 and 6. Ideally, we would have to know the appropriate
parameters Eps and MinPts of each cluster and at least one point from the respective cluster.
Then, we could retrieve all points that are density-reach-able from the given point using the
correct parameters. But there is no easy way to get this information in advance for all clusters of
the database. However, there is a simple and effective heuristic to deter-mine the parameters Eps
and MinPts of the "thinnest", i.e. least dense, cluster in the database. Therefore, DBSCAN uses
global values for Eps and MinPts, i.e. the same values for all clusters. The density parameters of
the "thinnest"cluster are good candidates for these global parameter values specifying the lowest
density which is not considered to be noise.

3.2.1 The Algorithm :

To find a cluster, DBSCAN starts with an arbitrary point p and retrieves all points density-
reachable from p wrt. Epsand MinPts. If p is a core point, this procedure yields a cluster wrt. Eps
and MinPts . If p is a border point, no points are density-reachable from p and DBSCAN visits
the next point of the database. Since we use global values for Eps and MinPts, DBSCAN may
merge two clusters according to definition 5 into one cluster, if two clusters of different density
are "close" to each other. Let the distance between two sets of points S l and S2be defined as dist
(S1, Sx) = min {dist(p,q) I p b q C$2}.Then, two sets of points having at least the density of the
thinnest cluster will be separated from each other only if the distance between the two sets is
larger than Eps. Consequently, a recursive call of DBSCAN may be necessary for the detected
clusters with a higher value for MinPts. This is, however, no disadvantage because the recursive
application of DBSCAN yields an elegant and very efficient basic algorithm. Furthermore, the
recursive clustering of the points of a cluster is only necessary under conditions that can be easily
detected. In the following, we present a basic version of DBSCAN omitting details of data types
and generation of additional information about clusters:

DBSCAN (SetOfPoints, Eps, MinPts)

// SetOfPoints is UNCLASSIFIED

ClusterId := nextId(NOISE);

FOR i FROM 1 TO SetOfPoints.size DO

Point := SetOfPoints.get(i);

IF Point.CiId = UNCLASSIFIED THEN

IF ExpandCluster(SetOfPoints, Point,ClusterId, Eps, MinPts) THEN

ClusterId := nextId(ClusterId)

END IF

END IF

END FOR

END; // DBSCAN

SetOfPoints is either the whole database or a discovered cluster ~om a p~vious run. Eps and
M$nPgs are the global density parameters determined either manually oraccording to the
heuristics presented in section 4.2. The~ncfion SetOfPoints. get ( i ) returns the i-th element of
SetOfPoints. The most important function used by DBSCAN is Expand Cluster which is
presented below:

ExpandCluster (SetOfPoints, Point, CiId, Eps,MinPts) : Boolean;

seeds : =SetOfPoints. regionQuery (Point, Eps );

IF seeds.size<MinPts THEN // no core point

SetOfPoint. changeCl Id (Point, NOISE)

RETURN False;
ELSE

// all points in seeds are density-

// reachable from Point

SetOfpoints. changeCiIds ( seeds, C1 Id);

seeds.delete(Point);

WHILE seeds <> Empty DO

currentP := seeds.first();

result := setofPoints.regionQuery(currentP,Eps) ;

IF result.size >= MinPts THEN

FOR i FROM 1 TO result.size DO

resultP := result.get(i)

IF resultP.CiId

IN (UNCLASSIFIED, NOISE} THEN

IF resultP.CiId = UNCLASSIFIED THEN

Seeds.append(resultP);

END IF;

SetOfPoints. changeCiId ( resultP, CiId)

END IF; // UNCLASSIFIED or NOISE

END FOR ;

END IF; // result.size >= MinPts

Seeds.delete(currentP);

END WHILE; // seeds <> Empty

RETURN True ;

END IF

END;// ExpandCluster
A call of SetOfPoint s.regionQue-ry(Point, Eps) returns the Eps-Neighb0rho0d Point in
SetOfPoints as a list of points. Region queries can be supported efficiently by spatial access
methods such as R*-trees (Beckmann et al. 1990) which are assumed to be available in a SDBS
for efficient processing of several types of spatial queries (Brinkhoffet al. 1994). The height an
R*-tree is O(log n) for a database of n points in the worst case and a query with a "small" query
region has to traverse only a limited number of paths m the R -tree. Since the Eps Neighborhoods
are expected to be small compared to the size of the whole data space, the average run time
complexity of a single region query is O(log n). For each of the points of the database, we have
at most one region query. Thus, the average run time complexity of DBSCAN is O(n * log
n).The C1 Td (cluster Id) of points which have been marked to be NOISE may be changed later,
if they are density-reach-able from some other point of the database. This happens for border
points of a cluster. Those points are not added to the seeds-list because we already know that a
point with a Cl Id of NOISE is not a core point. Adding those points to seeds would only result
in additional region queries which would yield no new answers. If two clusters C! and C2 are
very close to each other, it might happen that some point p belongs to both, C1 and C2.Then p
must be a border point in both clusters because other-wise C1 would be equal to C2 since we use
global parameters. In this case, point p will be assigned to the cluster discovered first. Except
from these rare situations, the result of DBSCAN is independent of the order in which the points
of the database are visited due to Lemma.

3.3 Methods by partitioning :

Partitioning algorithms construct a partition of a database D of n objects into a set of k clusters, k


is an input parameter for these algorithms, i.e some domain knowledge is required which
unfortunately is not available for many applications. The partitioning algorithm typically starts
with an initial partition of D and then uses an iterative control strategy to optimize an objective
function. Each cluster is represented by the gravity center of the cluster (k-means algorithms) or
by one of the objects of the cluster located near its center (k-medoid algorithms). Consequently,
partitioning algorithms use a two-step procedure. First, determine k representatives minimizing
the objective function. Second, as-sign each object to the cluster with its representative "closest"
to the considered object. The second step implies that apartition is equivalent to a voronoi
diagram and each cluster is contained in one of the voronoi cells. Thus, the shape of all lusters
found by a partitioning algorithm is convex which is very restrictive. Ng & Han (1994) explore
partitioning algorithms for KDD in spatial databases. An algorithm called CLARANS(Clustering
Large Applications based on RAN domized Search) is introduced which is an improved k-
medoid meth-od. Compared to former k-medoid algorithms, CLARANSis more effective and
more efficient. An experimental evaluation indicates that CLARANS runs efficiently on
databases of thousands of objects. Ng &Han (1994) also discuss methods to determine the
"natural" number knat of clusters in a database. They propose to run CLARANS once for each k
from 2 to n. For each of the discovered clusterings the silhouette coefficient (Kaufman &
Rousseeuw 1990) is calculated, and finally, the clustering with the maximum silhouette
coefficient is chosen as the "natural" clustering. Unfortunately, the run time of this approach is
prohibitive for large n, because it implies O(n) calls of CLARANS.CLARANS assumes that all
objects to be clustered can re-side in main memory at the same time which does not hold for
large databases. Furthermore, the run time of CLARANS is prohibitive on large databases.
Therefore, Ester, Kriegel&Xu (1995) present several focusing techniques which ad-dress both of
these problems by focusing the clustering process on the relevant parts of the database. First, the
focus is small enough to be memory resident and second, the runtime of CLARANS on the
objects of the focus is significantly less than its run time on the whole database

3.3.2 Distributed method based on the K-means algorithm :

In this section, the distributed k-means algorithm will be proposed. For this purpose, we first
briefly introduce the centralized k-means algorithm which has been very well developed in the
existing literature.
3.3.2.1 Introduction to the Centralized k-Means Algorithm
Given a set of observations {x1, x2, . . . , xn}, where each observation is a d-dimensional real-
valued vector, the k-means algorithm [7] aims to partition the n observations into k(≤ n) sets S =
{S1, S2, . . . , Sk} so as to minimize the within-cluster sum of squares (WCSS) function. In other
words, its objective is to find
k
argmin=
∑ ∑
2
‖ xi−cj‖
S j=1 xi ∈ si

where cj is the presentation of cluster j, generally the centroid of points in Sj.


The algorithm uses an iterative refinement technique. Given an initial set of k centroids c1(1), . . .
, ck(1), the algorithm proceeds by alternating between an assignment step and an update step as
follows. During the assignment step, assign each observation to the cluster characterized by the
nearest centroid, that is

where each xp is assigned to exactly one cluster, even if it could be assigned to two or more of
them. Apparently, this step can minimize the WCSS function.
During the update step, the centroid, say ci(T + 1), of the observations in the new cluster is
computed as follows
Since the arithmetic mean is a least-squares estimator, this step also minimizes the WCSS
function.
The algorithm converges if the centroids no longer change.
The k-means algorithm can converge to a (local) optimum, while there is no guarantee for it to
converge to the global optimum [7]. Since for a given k, the result of the above clustering
algorithm depends solely on the initial centroids, a common practice in clustering the sensor
observations is to execute the algorithm several times for different initial centroids and then
select the best solution.
The computational complexity of the k-means algorithm is O(nkdM) [7], where n is the number
of the d-dimensional vectors, k is the number of clusters, and M is the number of iterations
before reaching convergence.
3.3.2.2 Choosing Initial Centroids Using the Distributed k-Means++ Algorithm :
The choice of the initial centroids is the key to making the k-means algorithm work well. In the
k-means algorithm, the partition result is dependent only on the initial centroids for a given k, so
does the distributed one. Thus, an effective distributed initial centroids choosing method is
important. Here we provide a distributed implementation of the k-means++ algorithm [24], a
centralized algorithm to find the initial centroids for the k-means algorithm. It is noted that k-
means++ generally outperforms k-means in terms of both accuracy and speed [24].
Let D(x) denote the distance from observation x to the closest centroids that have been chosen.
The k-means++ algorithm [24] is executed as follows.
1) Choose randomly an observation from {x1, x2, . . . , xn} as the first centroid c1.
2) Take a new center cj, choosing x from the observations with probability

3) Repeat step 2) until we have taken k centers altogether.


Consider that the n nodes are deployed in an Euclidean space of any dimension and suppose that
each node has a limited sensing radius which may be different for different nodes, therefore
leading to the fact that the underlying topology of the WSN is directed. Each node is endowed
with a real vector xi ∈ Rd representing the observation. Here we assume that every node has its
own unique identification (ID), and further the underlying topology of the WSN is strongly
connected.
The detailed realization of the distributed k-means++ algorithm is as shown in Algorithm 1.
3.3.2.3 Distributed k-Means Algorithm :

You might also like