Skip to main content
. 2020 May 14;20(10):2785. doi: 10.3390/s20102785
Algorithm 1 Anonymization Algorithm.

Input:minvorg, maxvorg, minvrep, maxvrep, minσorg, maxσorg, ϵ.

Output: Report value v and standard deviation σ of sensing error

  • 1:

    Obtain sensed value v and standard deviation σ of sensing error

  • 2:

    if the standard deviation is considered as private information then

  • 3:

    ϵ←ϵ/2

  • 4:

    end if

  • 5:

    v←min(max(minvorg,v),maxvorg)  /* If v is smaller than minvorg (or larger than maxvorg), v is set to minvorg (or maxvorg).*/

  • 6:

    v←v+Lap((maxvorg−minvorg)/ϵ)  /* The global sensitivity is maxvorg−minvorg.*/

  • 7:

    v←min(max(minvrep,v),maxvrep)  /* If v is smaller than minvrep (or larger than maxvrep), v is set to minvrep (or maxvrep).*/

  • 8:

    if the standard deviation is considered as private information then

  • 9:

    σ←min(max(minσorg,σ),maxσorg)  /* If σ is smaller than minσorg (or larger than maxσorg), σ is set to minσorg (or maxσorg).*/

  • 10:

    σ←σ+Lap((maxσorg−minσorg)/ϵ)  /* The global sensitivity is maxσorg−minσorg.*/

  • 11:

    end if

  • 12:

    Report v and σ.