Skip to main content
. 2022 Dec 6;22(23):9531. doi: 10.3390/s22239531
Algorithm 1 Different DBSCAN-based K value selections.
  • Input :

    P from CNNs, PR1×Q, epsilon, minPts, D.

  • 1:

    Sort P in descending order of size, and go from one dimension to two dimensions;

  • 2:

    PmaxP, epsilon = 2, minPts = 1, D = 0, K = 0;

  • 3:

    while j=1 to Q do

  • 4:

        D=[pmax(x)pj(x)]2+[pmax(y)pj(y)]2

  • 5:

        if D<epsilon then

  • 6:

            K++;

  • 7:

        else

  • 8:

            K;

  • 9:

        end if

  • 10:

    end while

  • Output :

    K, K(1,2,3)