
Calibrate a privacy budget to a tolerable error, or the reverse
Source:R/dp_native2.R
morie_dp_release_calibration.RdFor Laplace noise of scale \(b = \Delta/(n\epsilon)\), the confidence half-width is \(b\log(1/(1-c))\). Supply a target error and get the epsilon it implies, or supply epsilon and get the error it buys.
Usage
morie_dp_release_calibration(
sensitivity = 1,
target_error = NULL,
epsilon = NULL,
confidence = 0.95,
n = 1
)Details
The point is to set the budget FROM a tolerable error rather than by convention. An epsilon above 10 means a likelihood ratio above 22000 between neighbouring datasets, which is close to no guarantee at all; the function warns rather than returning it silently.
Examples
round(morie_dp_release_calibration(1,
target_error = 0.01,
n = 1000
)$epsilon, 4)
#> [1] 0.2996