Learn R Programming

DPpack (version 0.2.0)

pooledCovDataAccess: Differentially Private Pooled Covariance Data Access Function

Description

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

Usage

pooledCovDataAccess(
  samples,
  lower.bound1,
  upper.bound1,
  lower.bound2,
  upper.bound2,
  approx.n.max
)

Value

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

Arguments

samples

List of two-column matrices from which to compute the pooled covariance.

lower.bound1, lower.bound2

Real numbers giving the lower bounds of the first and second columns of samples, respectively.

upper.bound1, upper.bound2

Real numbers giving the upper bounds of the first and second columns of samples, respectively.

approx.n.max

Logical indicating whether to approximate n.max, which is defined to be the length of the largest input vector. Approximation is best if n.max is very large.

References

Liu2019bDPpack

Kifer2011DPpack

Examples

Run this code
x1 <- matrix(c(1,4,-2,8,-6,-3),ncol=2)
x2 <- matrix(c(1,2,-5,7),ncol=2)
pooledCovDataAccess(list(x1,x2),-10,10,-10,10,FALSE)

Run the code above in your browser using DataLab