Learn R Programming

DPpack (version 0.2.0)

histogramDataAccess: Differentially Private Histogram Data Access Function

Description

This function performs the data access step in the computation of a differentially private histogram. The true values are computed using hist, while the sensitivities are calculated based on bounded and unbounded differential privacy Kifer2011DPpack according to the theoretical values Liu2019bDPpack.

Usage

histogramDataAccess(x, breaks, mechanism)

Value

List of the true histogram and the sensitivities calculated based on bounded and unbounded differential privacy.

Arguments

x

Numeric vector from which the histogram will be formed..

breaks

Identical to the argument with the same name from hist.

mechanism

String indicating which mechanism to use for differential privacy. If the 'Laplace' mechanism is chosen, l1 sensitivities are returned. If the 'Gaussian' or 'analytic' mechanisms are chosen, l2 sensitivities are returned.

References

Liu2019bDPpack

Kifer2011DPpack

Examples

Run this code
histogramDataAccess(c(1,4,3,2,3), 'Sturges', 'Laplace')

Run the code above in your browser using DataLab