# A Novel Local Density Hierarchical Clustering Algorithm Based on Reverse Nearest Neighbors

Authors: Yaohui Liu; Dong Liu; Fang Yu; Zhengming Ma
Journal: Mathematical Problems in Engineering
 (2019)

---

## Abstract

Clustering is widely used in data analysis, and density-based methods are developed rapidly in the recent 10 years. Although the state-of-art density peak clustering algorithms are efficient and can detect arbitrary shape clusters, they are nonsphere type of centroid-based methods essentially. In this paper, a novel local density hierarchical clustering algorithm based on reverse nearest neighbors, RNN-LDH, is proposed. By constructing and using a reverse nearest neighbor graph, the extended core regions are found out as initial clusters. Then, a new local density metric is defined to calculate the density of each object; meanwhile, the density hierarchical relationships among the objects are built according to their densities and neighbor relations. Finally, each unclustered object is classified to one of the initial clusters or noise. Results of experiments on synthetic and real data sets show that RNN-LDH outperforms the current clustering methods based on density peak or reverse nearest neighbors.


---

## Body

## 1. Introduction

Clustering is the task to find a set of groups in which similar objects are in the same group, but different objects are separated into different groups. Since clustering can uncover the inherent, potential, and unknown knowledge, principles, or rules in the real-world, it has been widely used in many fields, including data mining, pattern recognition, machine learning, information retrieval, image analysis, and computer graphics [1–3]. According to the strategies used, clustering algorithms are traditionally classified into connectivity-based approaches, centroid-based approaches, distribution-based approaches, and density-based approaches [1, 2]. Among these kinds of approaches, density-based approaches allow to discover clusters with arbitrary shapes and different sizes without specifying the number of clusters.In density-based clustering, clusters are considered to be dense regions of objects separated by low-density regions representing noise. With respect to clustering, the procedure can be broken up into two steps: estimating the density of each object and grouping density-connected objects.The first approach adopted the density-based strategy proposed by Ester et al. [4] in the paper “Density-Based Spatial Clustering of Applications with Noise,” which is dubbed as DBSCAN. In this approach, the density of each object is defined as the number of objects contained in its eps neighborhood. If the number is greater than minpts, the object is regarded as core objects, otherwise, as noise. Then, all objects that are reachable from one of the unclustered core objects are grouping to a cluster. However, it is difficult for DBSCAN to select two proper parameters eps and minpts. Another drawback of DBSCAN is that the adjacent clusters of different densities could not be properly identified [5, 6].Density peak clustering (DPC) [7] is another famous strategy for density-based clustering, which is based on the idea that cluster centres have higher densities than their neighbors and are far away from each other. This method can identify the cluster centres from the decision graph, which is constructed by the density and the distance attributes of each objects. Moreover, it only needs one parameter. Although it seems more convenient than DBSCAN in completing clustering, it has some inner defaults. First, it is a nonsphere type of centroid-based method essentially according to DPC’s definition of density peak and the strategy of grouping. So, in some cases, complex shapes still cannot be recognized by this method. Second, the cluster centres are picked out from the decision graph manually, which limits the application of DPC. Besides, it is very difficult to select the true centres on some specific data sets. Third, errors will be propagated in the subsequent assignment process.To remedy these limitations in DPC, there are many improved methods that have been proposed [5, 8–14]. FKNN-DPC [8] defines a uniform local density metric based on the k-nearest neighbors and uses a fuzzy technique to complete the assignment procedure after the cluster centres have been found out manually. ADPC [5] calculates local density of each object on its k-nearest neighbors by using Gaussian kernel function and applies the divide-and-conquer strategy to find cluster centres and group other objects automatically. RECOME [10] defines a new density measure as the ratio of each object’s density to the maximum density of its k-nearest neighbors and also uses the divide-and-conquer strategy to partition a data set. Although these algorithms have improved DPC in some aspects, they still suffer from some drawbacks of centroid-based methods.In contrast to the algorithms listed above, RECORD [15], RNN-DSC, [16], IS-DSC [17], and ISB-DSC [6] use reverse nearest neighbors to define object density. From the graph theory angle to interpret, these algorithms use the directed graph to complete clustering. In the graph, each vertex is an object of a data set, and for any two vertexes a and b, there is a directed edge from a to b if b is one of the k-nearest neighbors of a. RECORD defines those vertexes as core objects whose out degrees are not lower than the input parameter k and outliers otherwise. Outliers are regarded as noises and eliminated from the graph, while core vertexes and their edges form a subgraph, from which all strong connected components are found out as the result of clustering. The main distinction between RNN-DSC and RECORD lies on the outliers’ assignment. In the former, an outlier will be grouped into the cluster that its nearest neighbor belongs to if the nearest neighbor is a core object. IS-DSC defines the k-influence space of each object as the intersection of its k-nearest neighbors set and reverse k-nearest neighbors set. The method applies the STRATIFY algorithm to remove outliers firstly and then performs the similar clustering procedure on remaining objects as RECORD, but each vertex is defined as the core object if its size of k-influence space is greater than 2k. ISB-DSC also uses k-influence space to create subgraph like IS-DSC, but the clustering procedure is applied on the whole data set. Comparing to DPC, the superiority of these approaches is that they no longer need to find the cluster centres. However, since RECORD, IS-DSC, and ISB-DSC employ a global threshold to predetermine outliers, they partition too many objects to noise. PIDC [18] uses the size of the unique closest neighbor set as an estimate of object density and growing strategies to complete clustering. Although this method is parameter independent, it is sensitive to noise and has high computing complexity.In this paper, we propose an improved clustering approach by combining thek-reverse nearest neighbor graph model and density hierarchical relationship model. Based on the reverse nearest neighbor model and parameter k, a directed graph is constructed from objects of a data set. By searching strong connected components in the graph, the data set is partitioned into several initial clusters. Then, we use density dependence and k nearest neighborhood to build the density hierarchical relationships of all objects. Each unclassified object is grouped into the same cluster in which its parent is. The algorithm has the following advantages: (1) The method searches core regions instead of density peaks. So it can find out the true clusters automatically rather than to get some false cluster centres. (2) A novel density measure is proposed based on the k reverse nearest neighbor, which can reflect the aggregate relations of objects. (3) It is more efficient that our approach classifies the unclustered objects by the local density hierarchy relationships. It also reduces the risk of misclassification by the orders of the objects.The proposed algorithm is performed on synthetic and real-world data sets, which are widely used for the performance tests of clustering algorithms. The results of RNN-DPC are compared with IS-DSC, ISB-DSC, RNN-DSC, and ADPC in terms of three very popular benchmarks: F-measure (F1) [19], adjusted mutual information (AMI), and Adjusted Rand Index (ARI) [20]. The ratio of the noise number to total objects number is taken as the benchmark too.The rest of the paper is organized as follows: Section2 makes a detailed description of the notations and definitions used in our algorithm. Section 3 describes the procedures of RNN-LDH in detail. Section 4 gives our experiment results and discusses the choice of parameter k briefly. Section 5 draws some conclusions.


## 2. RNN-DHR Algorithm

In this section, we give the detail description of RNN-LDH theoretically. Some definitions in the section were introduced in other papers but modified by our method.


### 2.1. Notations and Definitions

The notations used in this paper are listed below:(1)
⋅: cardinal of a set(2)
X: set of data with d dimension; d: the dimension number of data(3)
x,y,z: any three objects in X(4)
dx,y: distance between two objects x and y(5)
Nkx: set of the k-nearest neighbor of object x; k: the input parameter with the integer value(6)
Especially,N1x is the set containing only one object which is nearest to object x(7)
Rkx: set of the k-reverse nearest neighbor of object x, which is defined as(1)Rkx=y∣y∈X,x∈Nky.(8)
std: standard deviation function.Definition 1 (directly density reachable).
Objectx is directly density reachable from an object y if(1)
Rkx≥k and Rky≥k(2)
x∈Nky and y∈NkxDefinition 2 (density reachable).
Objectx is directly density reachable from object y if there is a chain of objects x1,…,xm, x=x1, and y=xm, which satisfies the conditions listed below:(1)
∀i,1≤i≤m,xi is a core object(2)
∀i,1≤i<m, xi is directly density reachable from xi+1Definition 3 (core region).
A core region (Rc) is a none empty subset of X such that(1)
Rc>k/d(2)
∀x,y∈Rc, x is density-reachable from yDefinition 4 (extended core region).
Given a core region (Rc), its extended core region (Re) composes of all elements in Rc and any object x which is satisfying the following conditions:(1)
x does not belong to any core region(2)
∃y∈Rc, x∈Rky and N1x=yDefinition 5 (local density).
Local density of an objectx is defined as(2)ρx=∑y∈RkxRky⋅e−d2x,y/δ2,where δ=maxx∈Xminy∈Rkxdx,y.Definition 6 (parent).
The parent of an objectx is defined as(3)parentx=y,ifH≠∅,x,otherwise,where H=y∣y∈Nkx,ρy≥ρx,anddx,y≤δ.
The parent represents a local density hierarchical relationship of objectx to its k-nearest neighbors.Definition 7 (hierarchical distance).
The hierarchical distance of an objectx is defined as(4)dhx=dx,y,if  parentx=y,miny∈Nkxdx,y,otherwise.Definition 8 (inner distance).
The inner distance of an extended core regionRe is defined as(5)dc=maxx∈Redh+b,where b=stddx,y∣x∈X,y=N1x is the standard deviation of distances of all objects to their closest neighbors. Usually, the distance of a core object to its closest core object is less than the distance to its closest boundary object. The offset b can help dc to capture the global distribution of objects.Definition 9 (density connected).
An objectx is density connected to an extended core region Re if there exists an object u and a chain x1,…,xm, x=x1, and y=xm such that(1)
y∈Re(2)
parentxi=xi+1anddxi,xi+1≤dcDefinition 10 (cluster).
Given an extended core regionRe, a cluster C is the union of Re and all objects x in X which are density connected to the Re.Definition 11 (noise).
An objectx is a noise if it does not belong to any cluster of X.NR is the noise ratio, which is defined asNR=noise/X.


## 2.1. Notations and Definitions

The notations used in this paper are listed below:(1)
⋅: cardinal of a set(2)
X: set of data with d dimension; d: the dimension number of data(3)
x,y,z: any three objects in X(4)
dx,y: distance between two objects x and y(5)
Nkx: set of the k-nearest neighbor of object x; k: the input parameter with the integer value(6)
Especially,N1x is the set containing only one object which is nearest to object x(7)
Rkx: set of the k-reverse nearest neighbor of object x, which is defined as(1)Rkx=y∣y∈X,x∈Nky.(8)
std: standard deviation function.Definition 1 (directly density reachable).
Objectx is directly density reachable from an object y if(1)
Rkx≥k and Rky≥k(2)
x∈Nky and y∈NkxDefinition 2 (density reachable).
Objectx is directly density reachable from object y if there is a chain of objects x1,…,xm, x=x1, and y=xm, which satisfies the conditions listed below:(1)
∀i,1≤i≤m,xi is a core object(2)
∀i,1≤i<m, xi is directly density reachable from xi+1Definition 3 (core region).
A core region (Rc) is a none empty subset of X such that(1)
Rc>k/d(2)
∀x,y∈Rc, x is density-reachable from yDefinition 4 (extended core region).
Given a core region (Rc), its extended core region (Re) composes of all elements in Rc and any object x which is satisfying the following conditions:(1)
x does not belong to any core region(2)
∃y∈Rc, x∈Rky and N1x=yDefinition 5 (local density).
Local density of an objectx is defined as(2)ρx=∑y∈RkxRky⋅e−d2x,y/δ2,where δ=maxx∈Xminy∈Rkxdx,y.Definition 6 (parent).
The parent of an objectx is defined as(3)parentx=y,ifH≠∅,x,otherwise,where H=y∣y∈Nkx,ρy≥ρx,anddx,y≤δ.
The parent represents a local density hierarchical relationship of objectx to its k-nearest neighbors.Definition 7 (hierarchical distance).
The hierarchical distance of an objectx is defined as(4)dhx=dx,y,if  parentx=y,miny∈Nkxdx,y,otherwise.Definition 8 (inner distance).
The inner distance of an extended core regionRe is defined as(5)dc=maxx∈Redh+b,where b=stddx,y∣x∈X,y=N1x is the standard deviation of distances of all objects to their closest neighbors. Usually, the distance of a core object to its closest core object is less than the distance to its closest boundary object. The offset b can help dc to capture the global distribution of objects.Definition 9 (density connected).
An objectx is density connected to an extended core region Re if there exists an object u and a chain x1,…,xm, x=x1, and y=xm such that(1)
y∈Re(2)
parentxi=xi+1anddxi,xi+1≤dcDefinition 10 (cluster).
Given an extended core regionRe, a cluster C is the union of Re and all objects x in X which are density connected to the Re.Definition 11 (noise).
An objectx is a noise if it does not belong to any cluster of X.NR is the noise ratio, which is defined asNR=noise/X.


## 3. Procedures of the RNN-DHR Algorithm

In this section, we discuss our algorithm in detail.Algorithm1 lists the procedures for performing RNN-LDH, which accepts two inputs: data set X and nearest neighbor parameter k and outputs a label vector. The value of each element in the label vector indicates which cluster that the corresponding object belongs to, and the object is a noise if its label value is zero.Algorithm 1:
RNN-LDH(X, k).
(1)
l
a
b
e
l
∀
x
∈
X
⟵
U
N
L
A
B
E
L
E
D;
(2)
p
a
r
e
n
t
⟵
GetLDH
(X, k);
(3)
c
i
d
⟵
1
;
(4)
E
C
R
s
⟵
;
(5)
for allx∈X
(6)
iflabelx = UNLABELED
(7)
ifRkx≥k
(8)
Re⟵FindECRx,k,cid;
(9)
ifRe≠∅
(10)
dccid⟵maxy∈Redhy+b;
(11)
ECRscid⟵Re;
(12)
cid⟵cid+1;
(13)
end if
(14)
else
(15)
labelx⟵NOISE;
(16)
end if
(17)
end if
(18)
end for
(19)
b
C
h
a
n
g
e
d
⟵
T
R
U
E
;
(20)
while(bChanged)
(21)
bChanged⟵FALSE;
(22)
for alllabelx=NOISE
(23)
cid⟵labelparentx;
(24)
ifcid ≠ Noise && dx,parentx≤dccid
(25)
labelx⟵cid;
(26)
bChanged⟵TRUE;
(27)
end if
(28)
end for
(29)
end while
(30)
returnlabel;In the procedure of Algorithm2, function GetLDH is called to get the local density hierarchical relationship (parent) of each object and the result is saved into the array variant parent firstly; then, from step 5 to 18, all extended core regions in data set X are found out by calling the FindECR procedure and saved to set variant ECRs, and each extended core region is an initial cluster; finally, from steps 20 to 29, each noise object connected to an initial cluster is identified as the same cluster by an iterative way if it satisfies the distance condition.Algorithm 2:
GetLDH(X, k).
(1)
for all x∈X
(2)
dmin⟵δ;
(3)
y⟵x;
(4)
for each o∈Nkx
(5)
if parento≠x&ρo≥ρx&dx,o≤dmin
(6)
dmin⟵dx,o;
(7)
y⟵o;
(8)
end if
(9)
end for
(10)
if y≠x
(11)
parentx=y;
(12)
dhx=dx,y;
(13)
else
(14)
parentx=x;
(15)
dhx=miny∈Nkxdx,y;
(16)
end if
(17)
end for
(18)
return parent;The algorithmGetLDH is realized according to Definition 6. The main purpose of this algorithm is to find out each object’s density-dependent object dubbed as parent in its k-nearest neighbors. Meanwhile, the hierarchical distance of each object is calculated by formula (5) and saved into dh array.Figure1 shows the result of GetLDH algorithm on Compound [21] data set. In this figure, the red circle represents the core object and the black circle represents the boundary or noise. The larger the density of the object is, the bigger the circle shows. A line with direct arrow represents the local density hierarchical relationship of two connected objects.Figure 1
Local density hierarchical relationship (for interpretation of the references to color in this figure legend, the reader is referred to the web version of this article).Algorithm3 represents the processing of FindECR for finding a new cluster. An unlabelled core object x is input as a seed and appended into a queue. The algorithm pops the first seed of the queue and performs the searching procedure in k-nearest neighbors of the seed iteratively. For all unlabelled objects which are visited in the procedure, those core objects are set to the same cluster number cid, while the others are labeled as noise. Step 3 to Step 17 finds out a core region starting from core object x. Steps 18–21 discard this core region if its size is not greater than k/d. Step 22–29 extends the core region by using Definition 4.Algorithm 3:
FindECR(x, k, cid).
(1)
Re⟵;
(2)
initialize an empty queueQ;
(3)
Q.enqueue(x);
(4)
while not emptyQ
(5)
y⟵Q.dequeue;
(6)
labely⟵cid;
(7)
Re⟵Re∪y;
(8)
for eacho∈Nky
(9)
iflabelo = UNLABELED & y∈Nko
(10)
ifNko≥k
(11)
Q.enqueue(o);
(12)
else
(13)
labelo⟵NOISE;
(14)
end if
(15)
end if
(16)
end for
(17)
end while
(18)
if Re≤k/d
(19)
label∀o∈Re⟵NOISE;
(20)
return {};
(21)
end if
(22)
for eachy∈Re
(23)
for eacho∈Nky
(24)
ify∈N1o&labelo=UNLABELED
(25)
Re⟵Re∪​o;
(26)
labelo⟵cid;
(27)
end if
(28)
end for
(29)
end for
(30)
returnRe;Figure2 shows the result of the FindECR algorithm on Compound [21] data set. In this figure, six extended core regions are found out and black dots represent the boundary and noise. The final results of our algorithm and the comparison with the state-of-art methods on Compound will be shown in the next section.Figure 2
Extended core regions (for interpretation of the references to color in this figure legend, the reader is referred to the web version of this article).


### 3.1. Choice ofk

The five algorithms discussed in this paper all need one parameterk. IS-DSC and ADPC did not give the way how to set the value of k. ISB-DSC compared its parameter setting with DBSCAN and drew a conclusion that it is more robust than DBSCAN for different setting of k, but it did not address the choice of k too. RNN-DSC discussed 2 approaches to determine an appropriate value of k. Each approach chose the best k from 1 to 100 by a criterion. RNN-LDH also can use these two ways to choose k. By analysing results of large amount of experiments, we cannot yet find out the theoretical bases of k choice. For achieving the best performance of each testing algorithm, we choose the k in the range independently. By this value, the number of clusters grouped by the algorithm is as close as possible to the true class number and F1 measure is largest.


### 3.2. Complexity of the Algorithm

The time complexity of RNN-LDH depends on the following aspects: (1) computing the distance between pointsO(n2); (2) sorting the distance vector of each object (O(n2)), the time complexity will be down to O(nlog(n)); (3) computing the local density ρ with k-reverse nearest neighbors (O(kn)) but k is not great than n; (4) calculating the distance dh for each object (O(kn)); (5) finding extended core regions (O(n2)); and (6) classifying noise (O(n2)). So the overall time complexity of RNN-LDH is O(n2).The above analysis shows that RNN-LDH has the same complexity as RNN-DSC and ADPC.


## 3.1. Choice ofk

The five algorithms discussed in this paper all need one parameterk. IS-DSC and ADPC did not give the way how to set the value of k. ISB-DSC compared its parameter setting with DBSCAN and drew a conclusion that it is more robust than DBSCAN for different setting of k, but it did not address the choice of k too. RNN-DSC discussed 2 approaches to determine an appropriate value of k. Each approach chose the best k from 1 to 100 by a criterion. RNN-LDH also can use these two ways to choose k. By analysing results of large amount of experiments, we cannot yet find out the theoretical bases of k choice. For achieving the best performance of each testing algorithm, we choose the k in the range independently. By this value, the number of clusters grouped by the algorithm is as close as possible to the true class number and F1 measure is largest.


## 3.2. Complexity of the Algorithm

The time complexity of RNN-LDH depends on the following aspects: (1) computing the distance between pointsO(n2); (2) sorting the distance vector of each object (O(n2)), the time complexity will be down to O(nlog(n)); (3) computing the local density ρ with k-reverse nearest neighbors (O(kn)) but k is not great than n; (4) calculating the distance dh for each object (O(kn)); (5) finding extended core regions (O(n2)); and (6) classifying noise (O(n2)). So the overall time complexity of RNN-LDH is O(n2).The above analysis shows that RNN-LDH has the same complexity as RNN-DSC and ADPC.


## 4. Results and Discussion

To evaluate the performance of RNN-LDH, we perform a set of experiments on synthetic and real world data sets which are commonly used to test the performance of clustering algorithms. Indeed, we compare the performance of RNN-LDH with well-known clustering algorithms including RNN-DSC in [15], IS-DSC in [16], ISB-DSC in [6], and ADPC in [5]. Three popular criteria F1 measure (F1) [19], adjusted mutual information (AMI), and adjusted rand index (ARI) [20] are used to evaluate the performance of the above clustering algorithms. The upper bounds of these criteria are all 1.0. The better the clustering is, the larger the benchmark values are.


### 4.1. Synthetic Data

Table1 shows the synthetic data sets we used in this paper. These data sets are all composed of classes with different densities, shapes, and orientations. The first 6 data sets were obtained from [21], and the remains were downloaded from [22]. The result of each algorithm for some of these synthetic data sets is displayed in Figure 3, plotted by different marks and color points, and all noises are plotted as black points. The parameter setting (k), cluster number found (C), noise ratio (NR), and values of benchmarks as F1, AMI, and ARI are listed in Table 2.Table 1
Synthetic data sets.
Data
Objects
Dimensions
Classes
Pathbased [20]
300
2
3
Compound [20]
399
2
6
Flame [20]
240
2
2
Dim1024 [20]
1024
1024
16
Spiral [20]
312
2
3
Jain [20]
373
2
2
t4.8k [21]
8000
2
6
t5.8k [21]
8000
2
6
t7.10k [21]
10000
2
9
t8.8k [21]
8000
2
8Figure 3
Comparison of RNN-LDH with RNN-DSC, IS-DSC, ISB-DSC, and ADPC. Different clusters are marked by different markers and colors (for interpretation of the references to color in this figure legend, the reader is referred to the web version of this article).Table 2
Results of the algorithm on synthetic data sets.
Algorithms
k
C
F1
AMI
ARI
NR (%)
k
C
F1
AMI
ARI
NR (%)
Pathbased
cluto-t4.8k
RNN_LDH
6
3
1
1
1
0.00
34
8
0.91
0.87
0.91
1.70
RNN_DSC
6
3
0.99
0.94
0.96
0.30
31
7
0.88
0.85
0.87
0.10
IS_DSC
10
3
1
1
1
50.70
63
4
0.84
0.79
0.81
16.60
ISB_DSC
5
4
0.94
0.82
0.88
4.70
21
7
0.68
0.74
0.55
0.90
ADPC
35
2
0.66
0.4
0.4
0.00
400
7
0.69
0.7
0.59
0.00
Compound
cluto-t5.8k
RNN_LDH
7
6
1
0.99
1
6.80
33
6
0.87
0.83
0.85
5.00
RNN_DSC
8
6
0.89
0.86
0.87
0.00
32
7
0.83
0.8
0.8
0.90
IS_DSC
10
5
1
1
1
31.60
62
7
0.99
0.98
0.99
20.50
ISB_DSC
8
8
0.97
0.92
0.97
1.80
39
12
0.85
0.85
0.84
2.10
ADPC
9
7
0.8
0.8
0.62
0.00
560
6
0.82
0.79
0.78
0.00
Flame
cluto-t7.10k
RNN_LDH
7
2
1
1
1
0.80
40
9
0.92
0.92
0.93
2.60
RNN_DSC
8
2
1
0.96
0.98
0.00
28
10
0.88
0.88
0.9
0.30
IS_DSC
4
2
0.7
0
−0.01
21.70
30
6
0.87
0.91
0.82
16.60
ISB_DSC
4
2
0.69
0.01
−0.01
1.30
18
18
0.86
0.87
0.83
1.50
ADPC
27
2
1
1
1
0.00
395
10
0.49
0.56
0.33
0.00
Dim1024
cluto-t8.8k
RNN_LDH
63
16
1
1
1
0.00
27
8
0.96
0.93
0.96
1.30
RNN_DSC
59
16
1
1
1
1.40
22
8
0.94
0.91
0.95
0.10
IS_DSC
63
16
1
1
1
39.60
30
4
0.68
0.78
0.56
12.00
ISB_DSC
58
16
1
1
1
6.30
10
14
0.98
0.96
0.98
2.10
ADPC
2
16
1
1
1
0.00
240
9
0.59
0.6
0.45
0.00
Spiral
Jain
RNN_LDH
2
3
1
1
1
0.00
16
2
1
1
1
0.50
RNN_DSC
2
3
1
1
1
0.00
15
2
1
1
1
0.00
IS_DSC
5
3
1
1
1
50.30
16
2
1
1
1
36.20
ISB_DSC
2
3
1
1
1
0.00
16
2
1
1
1
0.00
ADPC
13
3
1
1
1
0.00
38
2
0.59
0.18
−0.02
0.00
If the number of clusters (C) found out is not correct, it is in italics. The best benchmark is written in bold in the condition of right cluster number.There are 300 objects in path-based data set. They are classified to 3 classes. One class forms a 3/4 circular ring, and the other two classes distribute at the both ends of the horizontal diameter of the ring. As shown in the first row of Figure3, RNN-LDH gets the best result, RNN-DSC also gets the correct number of clusters, and the other three algorithms classify the data set incorrectly.Compound has six classes with different densities. Two adjacent classes in the upper-left corner are subject to Gaussian distribution, and in the right of the figure, the class with the irregular shape is surrounded by the class with lowest density. In the bottom-left corner, the smallest class is encircled by the ring-shape class. As shown in the second row of Figure3, our method partitions three classes exactly which are labeled as yellow hexagram, blue left-pointing triangle, and fuchsia upward-pointing triangle, and one object in the contiguous zone of two classes in the upper-left corner is classified incorrectly. Only part objects (green diamond) in the lowest density class are recognized, and unrecognized objects are labeled as noise (black points). Although all objects are classified to one of six classes by RNN-DSC, many objects are partitioned wrong. Although IS-DSC gets the best benchmarks, it only finds out core objects, but too many other objects are treated as noise. ISB-DSC and ADPC even cannot find correct number of classes.A particularly challenging feature of Frame, t7.10k, and t8.8k is that classes have homogeneous distributions and are very close to each other. RNN-LDH outperforms the other algorithms on the data sets. On the data set Frame, RNN-LDH takes two outliers in the upper-left corner as noise while ADPC classifies these two objects to the upper class. RNN-DSC misclassifies one object in the adjacent area of two classes. On t8.8k, the result of RNN-DSC is closed to RNN-LDH. Although ISB-DSC has the highest benchmarks, we can see it partition the data set incorrectly from Figure3.Spiral has 3 classes which embrace each other, and Dim1024 is a high-dimensional data set and has 16 Gaussian classes with 1024 points. From Table2, we can see the clustering algorithms all can get good results, but IS-DSC has a high noise ratio. Jain has two moon shape classes with different densities. ADPC divides the high density class into two parts and classifies the lower density class to the nearest part. Results of these three data sets are not displayed.t4.8k has six classes with random noise. A thin sine curve runs across classes. RNN-LDH partitions the data set into 8 clusters for the sine curve is divided into several segments: the upper-left segment and the bottom-right segment are treated as two clusters, the bottom-left segment is looked upon as noise, and other segments are classified into their nearest clusters. RNN-DSC detected out only one segment of this curve. The other three algorithms are unable to partition some of main classes.t5.8k has six label-like classes and a thick stick running across them. It also contains random noise. All label-like classes are found by the five algorithms. IS-DSC gets the highest benchmarks with highest noise ratio again. Our algorithm treats the stick as noise. RNN-DSC finds out one segment of the stick. ISB-DSC finds out 3 segments of the stick as 3 independent clusters and classifies some noise into 3 independent clusters too. ADPC partitions all objects into 6 clusters.


### 4.2. Real-World Data

Table3 shows the real-world data sets we used to test the algorithms, which were downloaded from website UCI [23]. For real-world data sets, it should be noted that we did a few data preprocessing on some of them or selected the subset from them to do experiments, which are all listed below:(i)
All samples with null or uncertain values or duplicates in the data sets were removed. Such data sets are Breast_C_W, Echocardiogram, and Internet-Ads.(ii)
Most of data sets have class attributes or character attributes. So Table3 only shows the number of attributes used to compute distances of samples.(iii)
SPECT-Heart data set has two subsets, and we took the SPECT.test subset to test the algorithms.(iv)
All text values in Chess were replaced by numbers, such as “f” was replaced by 0 and “t” by 1 and so on.(v)
The attribute nos. 1 and 10–13 were removed from Echocardiogram, and the second attribute (“still-alive”) was selected as the clustering label.(vi)
Lung-cancer is a sparse data set. There are 4 values for the fifth attribute, and 1 value for the ninth attribute was “?” (unknown). We replaced them with 0.(vii)
Heart-disease has 10 sub-data sets. We used “reprocessed hugarian data” to test the algorithms. This data set is also unbalance because its largest cluster has more than 60% samples, while the smallest one has less than 6% samples.Table 3
Real-world data sets.
Data
Objects
Attributes
Classes
Breast_C_W
683
9
2
Internet-Ads
2359
1558
2
Image-seg
2100
19
7
Lung-cancer
32
56
3
SPECT-Heart
187
22
2
Zoo
101
16
7
Wine
178
13
3
Echocardiogram
106
11
2
Liver-disorders
345
6
2
Monks-3
432
6
2
Sonar
208
60
2
Ionosphere
351
34
2
Wholesale
440
8
3
Heart-disease
294
13
5
Contraceptive-M
1473
8
3
Hayes-roth
160
4
3Table4 shows the experiment results of the five methods.Table 4
Results of algorithm on real-world data sets.
Algorithm
k
C
F1
AMI
ARI
NR (%)
k
C
F1
AMI
ARI
NR (%)
Breast_C_W
Internet-Ads
RNN_LDH
30
2
0.97
0.83
0.9
11.00
130
2
0.92
0.43
0.63
13.80
RNN_DSC
11
2
0.69
0.01
−0.01
0.30
107
2
0.92
0.39
0.59
2.90
IS_DSC
—
—
—
—
—
—
—
—
—
—
—
—
ISB_DSC
78
2
0.97
0.81
0.87
8.70
146
2
0.91
0.38
0.58
2.50
ADPC
44
2
0.93
0.62
0.74
0.00
400
2
0.9
0.31
0.53
0.00
Image-seg
Lung-cancer
RNN_LDH
22
7
0.65
0.59
0.41
1.80
4
3
0.63
0.15
0.15
15.60
RNN_DSC
12
7
0.59
0.56
0.36
0.30
2
1
0.58
—
0
0.00
IS_DSC
33
5
0.71
0.64
0.49
39.90
7
2
0.62
0.12
0.13
50.00
ISB_DSC
19
6
0.65
0.58
0.41
2.80
7
2
0.69
0.28
0.29
0.00
ADPC
12
7
0.63
0.58
0.36
0.00
2
1
0.58
—
0
0.00
SPECT-Heart
Zoo
RNN_LDH
14
2
0.89
0
−0.02
0.40
9
7
0.79
0.73
0.66
28.70
RNN_DSC
5
1
0.96
0
0
0.40
4
8
0.77
0.7
0.6
7.90
IS_DSC
25
1
0.94
—
0
41.60
23
3
1
1
1
53.50
ISB_DSC
16
2
0.89
0.09
0.27
5.20
6
7
0.79
0.77
0.72
44.60
ADPC
10
2
0.82
0.02
0
0.00
12
7
0.63
0.58
0.36
0.00
Lung-cancer
Liver-disorders
RNN_LDH
4
3
0.63
0.15
0.15
15.60
9
2
0.67
0
0
0.00
RNN_DSC
2
1
0.58
—
0
0.00
5
2
0.67
0
0
0.30
IS_DSC
7
2
0.62
0.12
0.13
50.00
—
—
—
—
—
—
ISB_DSC
7
2
0.69
0.28
0.29
0.00
11
2
0.67
0
−0.01
5.20
ADPC
2
1
0.58
—
0
0.00
31
2
0.67
0
0
0.00
Hayes-roth
Wine
RNN_LDH
6
3
0.59
0.18
0.14
19.40
34
3
0.72
0.39
0.38
3.90
RNN_DSC
4
3
0.45
0.02
0.02
0.60
20
3
0.73
0.42
0.38
0.60
IS_DSC
13
2
0.67
0.05
0.05
34.40
16
3
0.7
0.31
0.29
38.20
ISB_DSC
8
3
0.58
0.16
0.14
28.80
12
4
0.64
0.41
0.34
3.40
ADPC
13
2
0.46
−0.01
−0.01
0.00
21
3
0.72
0.41
0.37
0.00
Sonar
Monks-3
RNN_LDH
11
2
0.66
0.01
0
4.30
5
2
0.66
0
0
1.90
RNN_DSC
6
2
0.57
0
0
2.40
3
3
0.65
0
0
0.50
IS_DSC
—
—
—
—
—
—
9
2
0.66
0
0
14.60
ISB_DSC
27
2
0.62
0
−0.01
5.30
7
2
0.66
−0.01
0
0.00
ADPC
14
2
0.66
0.02
0
0.00
10
2
0.65
0.08
0.02
0.00
Echocardiogram
Heart-disease
RNN_LDH
6
2
0.71
0.01
−0.03
2.30
6
4
0.55
0.02
0.03
4.00
RNN_DSC
4
2
0.71
0.01
0.06
0.80
4
4
0.53
0
−0.02
1.70
IS_DSC
28
2
0.8
0.06
0.15
47.00
—
—
—
—
—
—
ISB_DSC
23
2
0.7
0.06
0.15
2.30
7
5
0.53
0.03
0
7.60
ADPC
5
2
0.7
0.01
0.06
0.00
6
4
0.55
0.02
0.04
0.00
Ionosphere
Contraceptive-M
RNN_LDH
15
2
0.7
0.01
0.02
2.80
8
3
0.51
0.03
0
2.50
RNN_DSC
4
3
0.66
0.03
−0.05
2.60
4
2
0.52
0.01
0
0.20
IS_DSC
—
—
—
—
—
—
—
—
—
—
—
—
ISB_DSC
18
2
0.83
0.02
−0.08
37.90
7
4
0.52
0.01
0
6.40
ADPC
2
4
0.77
0.26
0.32
0.00
44
3
0.45
0.03
0.02
0.00The attribute characters of Internet-Ads, Echocardiogram, Heart-disease, and Liver-disorders are categorical, integral, and real. The first three data sets are unbalance data sets because their vast majority of samples are in one class. Internet-Ads are also sparse. The benchmarks show that RNN-LDH outperforms other algorithms on Internet-Ads. For Echocardiogram, IS_DSC gets the best benchmark, but it classifies near half samples into noise. Compared to the other 3 algorithms, RNN-LDH gets the best results on F1.The attribute values of Breast_C_W, Lung-cancer, and Wholesale are all integral. Our algorithm outperforms the others on all benchmarks for the first two data sets. For Lung-cancer, the other four algorithms cannot get the correct cluster numbers.The attribute characters of Image-seg, Wine, and Sonar are real. For Image-seg, RNN-LDH does the best work than the others. IS_DSC gets the highest benchmarks but with the highest noise ratio and the wrong cluster number. For Wine and Sonar, RNN-LDH outperforms the other algorithms on one benchmark.The attribute characters of SPECT-Heart, Monk-3, and Hays-roth are categorical. SPECT-Heart is also unbalance. For these data sets, our method outperforms the other methods on F1. The attribute characters of the remaining data sets are multiple. Our method does better than RNN-DSC, IS-DSC, and ISB-DSC.The experimental results of RNN-LDH are combined with the experimental results of RNN-DSC, ISB-DSC, and ADPC, respectively, into three data groups. Each data group has 2 columns and 135 rows. One column represents the algorithm RNN-LDH, and the other column is one of other three methods. 135 rows are divided into 5 labels: F1, AMI, ARI, NR, and CR. Label CR represents the correct ratio of cluster numbers, which is calculated by the following equation:(6)CR=1−C−TCTC,where C represents the cluster number the algorithms found out and TC represents the true cluster number of the data set.The Friedman tests are carried out on these 3 data groups, and thep value of each test is listed in Table 5. Because the results of IS-DSC are not good, especially on the real-world data sets, we do not do the Friedman test on them with RNN-LDH.Table 5
Friedman test.
Data group
p value
RNN-LDH and RNN-DSC
5.53e − 06
RNN-LDH and ISB-DSC
9.90e − 03
RNN-LDH and APDC
7.49e − 07Thep values in Table 5 show that the results of our algorithm are significantly different with the results of the other algorithms.


## 4.1. Synthetic Data

Table1 shows the synthetic data sets we used in this paper. These data sets are all composed of classes with different densities, shapes, and orientations. The first 6 data sets were obtained from [21], and the remains were downloaded from [22]. The result of each algorithm for some of these synthetic data sets is displayed in Figure 3, plotted by different marks and color points, and all noises are plotted as black points. The parameter setting (k), cluster number found (C), noise ratio (NR), and values of benchmarks as F1, AMI, and ARI are listed in Table 2.Table 1
Synthetic data sets.
Data
Objects
Dimensions
Classes
Pathbased [20]
300
2
3
Compound [20]
399
2
6
Flame [20]
240
2
2
Dim1024 [20]
1024
1024
16
Spiral [20]
312
2
3
Jain [20]
373
2
2
t4.8k [21]
8000
2
6
t5.8k [21]
8000
2
6
t7.10k [21]
10000
2
9
t8.8k [21]
8000
2
8Figure 3
Comparison of RNN-LDH with RNN-DSC, IS-DSC, ISB-DSC, and ADPC. Different clusters are marked by different markers and colors (for interpretation of the references to color in this figure legend, the reader is referred to the web version of this article).Table 2
Results of the algorithm on synthetic data sets.
Algorithms
k
C
F1
AMI
ARI
NR (%)
k
C
F1
AMI
ARI
NR (%)
Pathbased
cluto-t4.8k
RNN_LDH
6
3
1
1
1
0.00
34
8
0.91
0.87
0.91
1.70
RNN_DSC
6
3
0.99
0.94
0.96
0.30
31
7
0.88
0.85
0.87
0.10
IS_DSC
10
3
1
1
1
50.70
63
4
0.84
0.79
0.81
16.60
ISB_DSC
5
4
0.94
0.82
0.88
4.70
21
7
0.68
0.74
0.55
0.90
ADPC
35
2
0.66
0.4
0.4
0.00
400
7
0.69
0.7
0.59
0.00
Compound
cluto-t5.8k
RNN_LDH
7
6
1
0.99
1
6.80
33
6
0.87
0.83
0.85
5.00
RNN_DSC
8
6
0.89
0.86
0.87
0.00
32
7
0.83
0.8
0.8
0.90
IS_DSC
10
5
1
1
1
31.60
62
7
0.99
0.98
0.99
20.50
ISB_DSC
8
8
0.97
0.92
0.97
1.80
39
12
0.85
0.85
0.84
2.10
ADPC
9
7
0.8
0.8
0.62
0.00
560
6
0.82
0.79
0.78
0.00
Flame
cluto-t7.10k
RNN_LDH
7
2
1
1
1
0.80
40
9
0.92
0.92
0.93
2.60
RNN_DSC
8
2
1
0.96
0.98
0.00
28
10
0.88
0.88
0.9
0.30
IS_DSC
4
2
0.7
0
−0.01
21.70
30
6
0.87
0.91
0.82
16.60
ISB_DSC
4
2
0.69
0.01
−0.01
1.30
18
18
0.86
0.87
0.83
1.50
ADPC
27
2
1
1
1
0.00
395
10
0.49
0.56
0.33
0.00
Dim1024
cluto-t8.8k
RNN_LDH
63
16
1
1
1
0.00
27
8
0.96
0.93
0.96
1.30
RNN_DSC
59
16
1
1
1
1.40
22
8
0.94
0.91
0.95
0.10
IS_DSC
63
16
1
1
1
39.60
30
4
0.68
0.78
0.56
12.00
ISB_DSC
58
16
1
1
1
6.30
10
14
0.98
0.96
0.98
2.10
ADPC
2
16
1
1
1
0.00
240
9
0.59
0.6
0.45
0.00
Spiral
Jain
RNN_LDH
2
3
1
1
1
0.00
16
2
1
1
1
0.50
RNN_DSC
2
3
1
1
1
0.00
15
2
1
1
1
0.00
IS_DSC
5
3
1
1
1
50.30
16
2
1
1
1
36.20
ISB_DSC
2
3
1
1
1
0.00
16
2
1
1
1
0.00
ADPC
13
3
1
1
1
0.00
38
2
0.59
0.18
−0.02
0.00
If the number of clusters (C) found out is not correct, it is in italics. The best benchmark is written in bold in the condition of right cluster number.There are 300 objects in path-based data set. They are classified to 3 classes. One class forms a 3/4 circular ring, and the other two classes distribute at the both ends of the horizontal diameter of the ring. As shown in the first row of Figure3, RNN-LDH gets the best result, RNN-DSC also gets the correct number of clusters, and the other three algorithms classify the data set incorrectly.Compound has six classes with different densities. Two adjacent classes in the upper-left corner are subject to Gaussian distribution, and in the right of the figure, the class with the irregular shape is surrounded by the class with lowest density. In the bottom-left corner, the smallest class is encircled by the ring-shape class. As shown in the second row of Figure3, our method partitions three classes exactly which are labeled as yellow hexagram, blue left-pointing triangle, and fuchsia upward-pointing triangle, and one object in the contiguous zone of two classes in the upper-left corner is classified incorrectly. Only part objects (green diamond) in the lowest density class are recognized, and unrecognized objects are labeled as noise (black points). Although all objects are classified to one of six classes by RNN-DSC, many objects are partitioned wrong. Although IS-DSC gets the best benchmarks, it only finds out core objects, but too many other objects are treated as noise. ISB-DSC and ADPC even cannot find correct number of classes.A particularly challenging feature of Frame, t7.10k, and t8.8k is that classes have homogeneous distributions and are very close to each other. RNN-LDH outperforms the other algorithms on the data sets. On the data set Frame, RNN-LDH takes two outliers in the upper-left corner as noise while ADPC classifies these two objects to the upper class. RNN-DSC misclassifies one object in the adjacent area of two classes. On t8.8k, the result of RNN-DSC is closed to RNN-LDH. Although ISB-DSC has the highest benchmarks, we can see it partition the data set incorrectly from Figure3.Spiral has 3 classes which embrace each other, and Dim1024 is a high-dimensional data set and has 16 Gaussian classes with 1024 points. From Table2, we can see the clustering algorithms all can get good results, but IS-DSC has a high noise ratio. Jain has two moon shape classes with different densities. ADPC divides the high density class into two parts and classifies the lower density class to the nearest part. Results of these three data sets are not displayed.t4.8k has six classes with random noise. A thin sine curve runs across classes. RNN-LDH partitions the data set into 8 clusters for the sine curve is divided into several segments: the upper-left segment and the bottom-right segment are treated as two clusters, the bottom-left segment is looked upon as noise, and other segments are classified into their nearest clusters. RNN-DSC detected out only one segment of this curve. The other three algorithms are unable to partition some of main classes.t5.8k has six label-like classes and a thick stick running across them. It also contains random noise. All label-like classes are found by the five algorithms. IS-DSC gets the highest benchmarks with highest noise ratio again. Our algorithm treats the stick as noise. RNN-DSC finds out one segment of the stick. ISB-DSC finds out 3 segments of the stick as 3 independent clusters and classifies some noise into 3 independent clusters too. ADPC partitions all objects into 6 clusters.


## 4.2. Real-World Data

Table3 shows the real-world data sets we used to test the algorithms, which were downloaded from website UCI [23]. For real-world data sets, it should be noted that we did a few data preprocessing on some of them or selected the subset from them to do experiments, which are all listed below:(i)
All samples with null or uncertain values or duplicates in the data sets were removed. Such data sets are Breast_C_W, Echocardiogram, and Internet-Ads.(ii)
Most of data sets have class attributes or character attributes. So Table3 only shows the number of attributes used to compute distances of samples.(iii)
SPECT-Heart data set has two subsets, and we took the SPECT.test subset to test the algorithms.(iv)
All text values in Chess were replaced by numbers, such as “f” was replaced by 0 and “t” by 1 and so on.(v)
The attribute nos. 1 and 10–13 were removed from Echocardiogram, and the second attribute (“still-alive”) was selected as the clustering label.(vi)
Lung-cancer is a sparse data set. There are 4 values for the fifth attribute, and 1 value for the ninth attribute was “?” (unknown). We replaced them with 0.(vii)
Heart-disease has 10 sub-data sets. We used “reprocessed hugarian data” to test the algorithms. This data set is also unbalance because its largest cluster has more than 60% samples, while the smallest one has less than 6% samples.Table 3
Real-world data sets.
Data
Objects
Attributes
Classes
Breast_C_W
683
9
2
Internet-Ads
2359
1558
2
Image-seg
2100
19
7
Lung-cancer
32
56
3
SPECT-Heart
187
22
2
Zoo
101
16
7
Wine
178
13
3
Echocardiogram
106
11
2
Liver-disorders
345
6
2
Monks-3
432
6
2
Sonar
208
60
2
Ionosphere
351
34
2
Wholesale
440
8
3
Heart-disease
294
13
5
Contraceptive-M
1473
8
3
Hayes-roth
160
4
3Table4 shows the experiment results of the five methods.Table 4
Results of algorithm on real-world data sets.
Algorithm
k
C
F1
AMI
ARI
NR (%)
k
C
F1
AMI
ARI
NR (%)
Breast_C_W
Internet-Ads
RNN_LDH
30
2
0.97
0.83
0.9
11.00
130
2
0.92
0.43
0.63
13.80
RNN_DSC
11
2
0.69
0.01
−0.01
0.30
107
2
0.92
0.39
0.59
2.90
IS_DSC
—
—
—
—
—
—
—
—
—
—
—
—
ISB_DSC
78
2
0.97
0.81
0.87
8.70
146
2
0.91
0.38
0.58
2.50
ADPC
44
2
0.93
0.62
0.74
0.00
400
2
0.9
0.31
0.53
0.00
Image-seg
Lung-cancer
RNN_LDH
22
7
0.65
0.59
0.41
1.80
4
3
0.63
0.15
0.15
15.60
RNN_DSC
12
7
0.59
0.56
0.36
0.30
2
1
0.58
—
0
0.00
IS_DSC
33
5
0.71
0.64
0.49
39.90
7
2
0.62
0.12
0.13
50.00
ISB_DSC
19
6
0.65
0.58
0.41
2.80
7
2
0.69
0.28
0.29
0.00
ADPC
12
7
0.63
0.58
0.36
0.00
2
1
0.58
—
0
0.00
SPECT-Heart
Zoo
RNN_LDH
14
2
0.89
0
−0.02
0.40
9
7
0.79
0.73
0.66
28.70
RNN_DSC
5
1
0.96
0
0
0.40
4
8
0.77
0.7
0.6
7.90
IS_DSC
25
1
0.94
—
0
41.60
23
3
1
1
1
53.50
ISB_DSC
16
2
0.89
0.09
0.27
5.20
6
7
0.79
0.77
0.72
44.60
ADPC
10
2
0.82
0.02
0
0.00
12
7
0.63
0.58
0.36
0.00
Lung-cancer
Liver-disorders
RNN_LDH
4
3
0.63
0.15
0.15
15.60
9
2
0.67
0
0
0.00
RNN_DSC
2
1
0.58
—
0
0.00
5
2
0.67
0
0
0.30
IS_DSC
7
2
0.62
0.12
0.13
50.00
—
—
—
—
—
—
ISB_DSC
7
2
0.69
0.28
0.29
0.00
11
2
0.67
0
−0.01
5.20
ADPC
2
1
0.58
—
0
0.00
31
2
0.67
0
0
0.00
Hayes-roth
Wine
RNN_LDH
6
3
0.59
0.18
0.14
19.40
34
3
0.72
0.39
0.38
3.90
RNN_DSC
4
3
0.45
0.02
0.02
0.60
20
3
0.73
0.42
0.38
0.60
IS_DSC
13
2
0.67
0.05
0.05
34.40
16
3
0.7
0.31
0.29
38.20
ISB_DSC
8
3
0.58
0.16
0.14
28.80
12
4
0.64
0.41
0.34
3.40
ADPC
13
2
0.46
−0.01
−0.01
0.00
21
3
0.72
0.41
0.37
0.00
Sonar
Monks-3
RNN_LDH
11
2
0.66
0.01
0
4.30
5
2
0.66
0
0
1.90
RNN_DSC
6
2
0.57
0
0
2.40
3
3
0.65
0
0
0.50
IS_DSC
—
—
—
—
—
—
9
2
0.66
0
0
14.60
ISB_DSC
27
2
0.62
0
−0.01
5.30
7
2
0.66
−0.01
0
0.00
ADPC
14
2
0.66
0.02
0
0.00
10
2
0.65
0.08
0.02
0.00
Echocardiogram
Heart-disease
RNN_LDH
6
2
0.71
0.01
−0.03
2.30
6
4
0.55
0.02
0.03
4.00
RNN_DSC
4
2
0.71
0.01
0.06
0.80
4
4
0.53
0
−0.02
1.70
IS_DSC
28
2
0.8
0.06
0.15
47.00
—
—
—
—
—
—
ISB_DSC
23
2
0.7
0.06
0.15
2.30
7
5
0.53
0.03
0
7.60
ADPC
5
2
0.7
0.01
0.06
0.00
6
4
0.55
0.02
0.04
0.00
Ionosphere
Contraceptive-M
RNN_LDH
15
2
0.7
0.01
0.02
2.80
8
3
0.51
0.03
0
2.50
RNN_DSC
4
3
0.66
0.03
−0.05
2.60
4
2
0.52
0.01
0
0.20
IS_DSC
—
—
—
—
—
—
—
—
—
—
—
—
ISB_DSC
18
2
0.83
0.02
−0.08
37.90
7
4
0.52
0.01
0
6.40
ADPC
2
4
0.77
0.26
0.32
0.00
44
3
0.45
0.03
0.02
0.00The attribute characters of Internet-Ads, Echocardiogram, Heart-disease, and Liver-disorders are categorical, integral, and real. The first three data sets are unbalance data sets because their vast majority of samples are in one class. Internet-Ads are also sparse. The benchmarks show that RNN-LDH outperforms other algorithms on Internet-Ads. For Echocardiogram, IS_DSC gets the best benchmark, but it classifies near half samples into noise. Compared to the other 3 algorithms, RNN-LDH gets the best results on F1.The attribute values of Breast_C_W, Lung-cancer, and Wholesale are all integral. Our algorithm outperforms the others on all benchmarks for the first two data sets. For Lung-cancer, the other four algorithms cannot get the correct cluster numbers.The attribute characters of Image-seg, Wine, and Sonar are real. For Image-seg, RNN-LDH does the best work than the others. IS_DSC gets the highest benchmarks but with the highest noise ratio and the wrong cluster number. For Wine and Sonar, RNN-LDH outperforms the other algorithms on one benchmark.The attribute characters of SPECT-Heart, Monk-3, and Hays-roth are categorical. SPECT-Heart is also unbalance. For these data sets, our method outperforms the other methods on F1. The attribute characters of the remaining data sets are multiple. Our method does better than RNN-DSC, IS-DSC, and ISB-DSC.The experimental results of RNN-LDH are combined with the experimental results of RNN-DSC, ISB-DSC, and ADPC, respectively, into three data groups. Each data group has 2 columns and 135 rows. One column represents the algorithm RNN-LDH, and the other column is one of other three methods. 135 rows are divided into 5 labels: F1, AMI, ARI, NR, and CR. Label CR represents the correct ratio of cluster numbers, which is calculated by the following equation:(6)CR=1−C−TCTC,where C represents the cluster number the algorithms found out and TC represents the true cluster number of the data set.The Friedman tests are carried out on these 3 data groups, and thep value of each test is listed in Table 5. Because the results of IS-DSC are not good, especially on the real-world data sets, we do not do the Friedman test on them with RNN-LDH.Table 5
Friedman test.
Data group
p value
RNN-LDH and RNN-DSC
5.53e − 06
RNN-LDH and ISB-DSC
9.90e − 03
RNN-LDH and APDC
7.49e − 07Thep values in Table 5 show that the results of our algorithm are significantly different with the results of the other algorithms.


## 5. Conclusions

In this paper, we proposed an improved density-based clustering algorithm, which is termed as RNN-DPC, by combining thek-reverse nearest neighbor model and the density hierarchical relationship. With the k-reverse nearest neighbor model, the proposed method partitions all observations of a data set into several unconnected core regions while outliers are around them initially. Comparing with density peak clustering, our method is more robust in finding initial clusters. By using the density hierarchical relationship, each unclustered object is grouped into the cluster that its parent object belongs to. If one’s parent is itself or it is unclassified to any cluster, it is a noise. In comparison with the RNN based method, our algorithm has lower noise ratio than IS-DSC and has higher accuracy than IS-DSC and RNN-DSC.



---

*Source: 2959017-2019-08-05.xml*