Skip to main content
. Author manuscript; available in PMC: 2016 Mar 11.
Published in final edited form as: Proc ACM Int Conf Inf Knowl Manag. 2015 Oct;2015:1001–1010. doi: 10.1145/2806416.2806441

Algorithm 2 Distance-based Sampling with Adaptive Threshold Algorithm (DSAT)

Input: D = {Di|1 ≤ iN, iZ}, T, C and ε.
Output: D̃ = {i|1 ≤ iN, iZ}
1: Run step 1,2,3,4 in Algorithm 1;
2: Skip the first M timestamps;
3: for each time point ti with i > M do
4: if countC, then set i = j
5:  Set d(Di,Dj)=d(Di,Dj)+Lap(2CΔε1)
6:  Set Ei=|countiCN|,ei=|Eiδ|δ, and ui = θei;
7: if counttCN0, then set i = max{0, i−1ui}
8: else set i = min{2, i−1 + ui};
9: if (Di, j) ≥ i then
10:   release a DP dataset i at ti with ε2C budget, and set count = count + 1, j = i;
11: else
12:   release j;
13: end if
14: if i == N and count < C then
15:   release N with all remaining privacy budget;
16: end if
17: end for