Skip to contents

Eigendecomposition of the private covariance. Because every step after the noisy release is post-processing, the eigendecomposition itself is FREE – the whole privacy cost was paid by morie_dp_covariance.

Usage

morie_dp_pca(X, k = 2, epsilon = 1, delta = 1e-05, C = 1, seed = NULL)

Arguments

X

data matrix, one row per record.

k

number of components.

epsilon, delta

privacy budget.

C

L2 clipping norm for a row.

seed

optional integer seed.

Value

list with components (p x k), eigenvalues, eigengap, explained_variance_ratio, scores.

Details

Accuracy is governed by the EIGENGAP, not by epsilon alone. When consecutive eigenvalues are close, the individual components are unstable under any perturbation, private or not, although the subspace they jointly span may be perfectly well determined. The function reports the gap and warns when it is small.

References

Dwork, C. et al. (2014). STOC, 11-20.

Examples

set.seed(1)
X <- matrix(rnorm(300), ncol = 3)
morie_dp_pca(X, k = 2, epsilon = 4, C = 4)$eigengap > -Inf
#> [1] TRUE