Skip to main content
. 2023 Sep 15;25(9):1342. doi: 10.3390/e25091342
Algorithm 3: Pseudocode for high-dimensional clustering based on k-adjacent cells searching.
                      Input: dataset Dd, multidimensional grid space Gd
                      Output: cluster label, cluster density, cluster number m
1: Initialization;
2: Rank all cells in descending order of density;
3: M cells number of Gd;
4: Traverse all grids; for the ith cell, construct its k-adjacent vector from the (i + 1)th to Mth
    cells according to Equation (16);
5: m 0
6: For i = 1 to M Do
7:    If the ith cell exists, Then
8:      m m + 1;
9:      Label the ith cell to be the mth cluster;
10:    Find the k-adjacent cells of the ith cell;
11:    Label these k-adjacent cells to be the mth cluster;
12:    Delete these k-adjacent cells and the current cell;
13: end If
14: end For
15: Label the data points according to their cells;
16: Calculate the mean density of the cells of each cluster;