Description Usage Arguments Value Methods (by generic) Slots References Examples
A class that implements the exponential mechanism of differential privacy,
for privatizing releases from sets (not necessarily numeric as
required by DPMechLaplace
). Currently limited to responses
from a finite sets  the most widely used case  as these induce easily
computed sampling distributions from a uniform base measure.
1 2 3 4 5 6 7 8 9  ## S4 method for signature 'DPMechExponential'
show(object)
## S4 method for signature 'DPMechExponential,DPParamsEps'
releaseResponse(mechanism,
privacyParams, X)
## S4 method for signature 'DPMechExponential'
sensitivityNorm(mechanism, X1, X2)

object 
an instance of class 
mechanism 
an object of class 
privacyParams 
an object of class 
X 
a privacysensitive dataset, if using sensitivity sampler a: list, matrix, data frame, numeric/character vector. 
X1 
a privacysensitive dataset. 
X2 
a privacysensitive dataset. 
list with slots per argument, actual privacy parameter and response:
mechanism response with length of target release:
privacyParams, sensitivity, responseSet, target, response
.
scalar numeric norm of nonprivate target
on datasets.
show
: automatically prints the object.
releaseResponse
: releases exponential mechanism responses.
sensitivityNorm
: measures target
quality score sensitivity.
sensitivity
nonnegative scalar numeric quality function sensitivity.
Defaults to Inf
for use with sensitivitySampler()
.
target
the quality score function mapping dataset to a function on
responses (elements of responseSet
).
gammaSensitivity
NA_real_
if inactive, or scalar in [0,1)
indicating that responses must be RDP with specific confidence.
responseSet
a list of possible responses of the mechanism.
Frank McSherry and Kunal Talwar. "Mechanism design via differential privacy." In the 48th Annual IEEE Symposium on Foundations of Computer Science (FOCS'07), pp. 94103. IEEE, 2007.
1 2 3 4 5 6 7 8 9 10  ## Sensitive data are strings of length at most 5.
## Task is to release most frequent character present, hence quality function
## is a closure that counts character frequencies for given candidate char.
## Global sensitivity is max string length.
qualF < function(X) { function(r) sum(r == unlist(strsplit(X, ""))) }
rs < as.list(letters)
m < DPMechExponential(sensitivity = 5, target = qualF, responseSet = rs)
X < strsplit("the quick brown fox jumps over the lazy dog"," ")[[1]]
p < DPParamsEps(epsilon = 1)
releaseResponse(m, p, X)

$privacyParams
Differential privacy level <U+03B5>=1
$sensitivity
[1] 5
$responseSet
$responseSet[[1]]
[1] "a"
$responseSet[[2]]
[1] "b"
$responseSet[[3]]
[1] "c"
$responseSet[[4]]
[1] "d"
$responseSet[[5]]
[1] "e"
$responseSet[[6]]
[1] "f"
$responseSet[[7]]
[1] "g"
$responseSet[[8]]
[1] "h"
$responseSet[[9]]
[1] "i"
$responseSet[[10]]
[1] "j"
$responseSet[[11]]
[1] "k"
$responseSet[[12]]
[1] "l"
$responseSet[[13]]
[1] "m"
$responseSet[[14]]
[1] "n"
$responseSet[[15]]
[1] "o"
$responseSet[[16]]
[1] "p"
$responseSet[[17]]
[1] "q"
$responseSet[[18]]
[1] "r"
$responseSet[[19]]
[1] "s"
$responseSet[[20]]
[1] "t"
$responseSet[[21]]
[1] "u"
$responseSet[[22]]
[1] "v"
$responseSet[[23]]
[1] "w"
$responseSet[[24]]
[1] "x"
$responseSet[[25]]
[1] "y"
$responseSet[[26]]
[1] "z"
$target
function (X)
{
function(r) sum(r == unlist(strsplit(X, "")))
}
$response
[1] "d"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.