Description Usage Arguments Value References See Also Examples

Given a constructed `DPMech-class`

, complete with `target`

function and `sensitivityNorm,`

and an `oracle`

for producing
records, samples the sensitivity of the target function to set the
mechanism's `sensitivity`

. Typically the method
`sensitivitySampler`

should be used instead; NOTE this method
does not properly set the `gammaSensitivity`

slot of
`DPMech-class`

unlike the preferred method.

1 2 3 | ```
## S4 method for signature 'DPMech,'function',numeric,numeric,numeric'
sensitivitySamplerManual(object,
oracle, n, m, k)
``` |

`object` |
an object of class |

`oracle` |
a source of random databases. A function returning: list,
matrix/data.frame (data in rows), numeric/character vector of records if
given desired length > 1; or single record given length 1, respectively
a list element, a row/named row, a single numeric/character. Whichever
type is used should be expected by |

`n` |
database size scalar positive numeric, integer-valued. |

`m` |
sensitivity sample size scalar positive numeric, integer-valued. |

`k` |
order statistic index in 1,..., |

`object`

with updated sensitivity parameter.

Benjamin I. P. Rubinstein and Francesco Ald<c3><a0>. "Pain-Free Random Differential Privacy with Sensitivity Sampling", accepted into the 34th International Conference on Machine Learning (ICML'2017), May 2017.

`sensitivitySampler`

preferred method for sensitivity
sampling.

1 2 3 4 5 6 | ```
## Simple example with unbounded data hence no global sensitivity.
f <- function(xs) mean(xs)
m <- DPMechLaplace(target = f, dims = 1)
P <- function(n) rnorm(n)
m <- sensitivitySamplerManual(m, oracle = P, n = 100, m = 10, k = 10)
m@sensitivity
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.