Skip to main content
. 2020 Sep 16;20(18):5297. doi: 10.3390/s20185297
Algorithm 1 Algorithm for Differential Privacy.
Input: data: TD, privacy budget: ϵ
Output: data with differential privacy protection: Diffp(TD)
  • 1:

    for attribute ti in TD do

  • 2:

     if attribute ti needs privacy protection then

  • 3:

      N = the number of candidates for attribute ti

  • 4:

      ti is real value with probability eϵeϵ+N1

  • 5:

      ti is other candidate value with probability 1eϵ+N1

  • 6:

     end if

  • 7:

    end for