Skip to main content
. 2021 Apr 2;21(7):2456. doi: 10.3390/s21072456
Algorithm 1 One-Class DBSCAN
Input:

  D: The dimension of the vector.

  m: The size of the training data.

  {x(1),x(2),,x(m)}: Training dataset

  ϵ: The parameter of One-Class DBSCAN, which means that the distance is ϵ.

  MinPts: The parameter of One-Class DBSCAN, which is the minimum number of data vectors within the distance ϵ required to form a core object.

Function:
  • 1:

    fori=1,2,,mdo

  • 2:

    for j=1,2,,D do

  • 3:

      xj(i)=xj(i)/kDxk(i)

  • 4:

    end for

  • 5:

    end for

  • 6:

    Initialize the set of core objects Ω=

  • 7:

    fori=1,2,,mdo

  • 8:

    Nϵ(x(i))=

  • 9:

    for j=1,2,,m do

  • 10:

      dis=x(i)x(j)2

  • 11:

      if disϵ then

  • 12:

       Nϵ(x(i))=Nϵ(x(i)){x(j)}

  • 13:

      end if

  • 14:

    end for

  • 15:

    if Nϵ(x(i))MinPts then

  • 16:

      Ω=Ω{x(i)}

  • 17:

    end if

  • 18:

    end for

  • 19:

    ifΩ=then

  • 20:

     Initialize vector v

  • 21:

    for j=1,2,,D do

  • 22:

      vj=1mkmxj(k)

  • 23:

    end for

  • 24:

    Ω = {v}

  • 25:

    end if

Output:

  Ω: The set of core objects