Skip to main content
. 2020 Mar 26;20(7):1836. doi: 10.3390/s20071836
Algorithm 1 Virtual sensor provisioning algorithm.
Input: Sample set X
  •  1:

    Step1:Classification

  •  2:

    Calculate the value of ω for each attribute.

  •  3:

    G={G1,G2,…,Gn}

  •  4:

    for1≤i<j≤ndo  

  •  5:

     if Θ(Gi)=Θ(Gj) then

  •  6:

      Gi=Gi∪Gj

  •  7:

     end if

  •  8:

    end for

  •  9:

    ReturnG={G1,G2,…,Gl}

  • 10:

    Step2:Clustering

  • 11:

    Cj=∅,(1≤j≤ki)

  • 12:

    μ(Gi)={μ1,μ2,…,μki}

  • 13:

    λi=argmindij

  • 14:

    Cλi=Cλi⋃{xi}

  • 15:

    forj=1,j++,j≤kido

  • 16:

    μ(Gi)′=1∣Cj∣∑xi∈Cjxi, then

  • 17:

     if μ(Gi)≠μ(Gi)′

  • 18:

      Update μ(Gi)=μ(Gi)′

  • 19:

     end if

  • 20:

    end for

Output: C*={C1*,C2*,…,Cl*}