Description Usage Arguments Value Methods (by generic) Slots Examples
A virtual class that implements common features of Laplace, Gaussian mechanisms from differential privacy, for privatizing numeric vector releases.
1 2 3 4 5 6 7 8 9 | ## S4 method for signature 'DPMechNumeric'
show(object)
## S4 method for signature 'DPMechNumeric'
sensitivityNorm(mechanism, X1, X2)
## S4 method for signature 'DPMechNumeric,DPParamsEps'
releaseResponse(mechanism, privacyParams,
X)
|
object |
an instance of class |
mechanism |
an object of class |
X1 |
a privacy-sensitive dataset. |
X2 |
a privacy-sensitive dataset. |
privacyParams |
an object of class |
X |
a privacy-sensitive dataset, if using sensitivity sampler a: list, matrix, data frame, numeric/character vector. |
scalar numeric norm of non-private target
on datasets.
list with slots per argument, actual privacy parameter;
mechanism response with length of target release:
privacyParams, sensitivity, dims, target, response
.
show
: automatically prints the object.
sensitivityNorm
: measures sensitivity of non-private target
.
releaseResponse
: releases mechanism responses.
sensitivity
non-negative scalar numeric target sensitivity.
Defaults to Inf
for use with sensitivitySampler()
.
target
the target non-private function to be privatized, takes lists.
Defaults to a constant function. Laplace mechanism assumes functions that
release numeric vectors of fixed dimension dims
.
gammaSensitivity
NA_real_
if deactive, or scalar in [0,1)
indicating that responses must be RDP with specific confidence.
dims
positive scalar numeric dimension of responses. Defaults to
NA_integer_
for use with sensitivitySampler()
which can
probe target
to determine dimension.
1 2 3 4 5 6 7 8 9 10 11 12 | f <- function(xs) mean(xs)
n <- 100
m <- DPMechLaplace(sensitivity = 1/n, target = f, dims = 1)
X1 <- runif(n)
X2 <- runif(n)
sensitivityNorm(m, X1, X2)
f <- function(xs) mean(xs)
n <- 100
m <- DPMechLaplace(sensitivity = 1/n, target = f, dims = 1)
X <- runif(n)
p <- DPParamsEps(epsilon = 1)
releaseResponse(m, p, X)
|
[1] 0.007968008
$privacyParams
Differential privacy level <U+03B5>=1
$sensitivity
[1] 0.01
$dims
[1] 1
$target
function (xs)
mean(xs)
$response
[1] 0.4991703
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.