
Differential privacy check (Kamath Eq 6.32)
Source:R/kamath_llm2_native.R
morie_kamath_ch6_differential_privacy.RdChecks P[M(A) in S] <= e^eps P[M(B) in S] and reports the epsilon that would be required.
Examples
morie_kamath_ch6_differential_privacy(function(D) if (D == "A") c(s1 = 0.6,
s2 = 0.4) else c(s1 = 0.4, s2 = 0.6), "A", "B", c("s1"),
0.5)
#> $estimate
#> [1] 0.4054651
#>
#> $epsilon_required
#> [1] 0.4054651
#>
#> $satisfied
#> [1] TRUE
#>
#> $p_A
#> [1] 0.6
#>
#> $p_B
#> [1] 0.4
#>
#> $ratio
#> [1] 1.5
#>
#> $epsilon
#> [1] 0.5
#>
#> $bound
#> [1] 0.6594885
#>
#> $n
#> [1] 1
#>
#> $method
#> [1] "differential privacy check (Kamath Eq 6.32)"
#>