Package: dppca 0.2.0

dppca: Differentially Private Principal Component Analysis and Visualization

Provides tools for differentially private principal component analysis (PCA) and visualization. Includes private principal component directions, scree and proportion of variance explained (PVE) estimates, and two-dimensional private score histograms with synthetic sampled points. Supports additive and sparse histogram mechanisms, group-wise score visualizations, and optional non-private comparisons. An integrated workflow produces loading plots, scree plots, score plots, variable plots, and biplots from shared private PCA estimates. An interactive 'shiny' application is also provided. Private direction estimation is based on Kim and Jung (2025) <doi:10.1002/sam.70053>. Private scree estimation draws on Dwork and Roth (2014) <doi:10.1561/0400000042>, Ramsay and Spicker (2025) <doi:10.48550/arXiv.2501.14095>, and Yu, Ren and Zhou (2024) <doi:10.3150/23-BEJ1706>. Private score frames use unbounded quantile mechanisms from Durfee (2023) <doi:10.52202/075280-3394>. Private score histograms use methods related to Wasserman and Zhou (2010) <doi:10.1198/jasa.2009.tm08651> and Karwa and Vadhan (2018) <doi:10.4230/LIPIcs.ITCS.2018.44>.

Authors:Yejin Jo [aut, cre], Minwoo Kim [aut], Sungkyu Jung [aut]

dppca_0.2.0.tar.gz
dppca_0.2.0.zip(r-4.7-x86_64)dppca_0.2.0.zip(r-4.7-arm64)dppca_0.2.0.zip(r-4.6-x86_64)dppca_0.2.0.zip(r-4.6-arm64)dppca_0.2.0.zip(r-4.5-x86_64)
dppca_0.2.0.tgz(r-4.6-x86_64)dppca_0.2.0.tgz(r-4.6-arm64)dppca_0.2.0.tgz(r-4.5-x86_64)dppca_0.2.0.tgz(r-4.5-arm64)
dppca_0.2.0.tar.gz(r-4.7-arm64)dppca_0.2.0.tar.gz(r-4.7-x86_64)dppca_0.2.0.tar.gz(r-4.6-arm64)dppca_0.2.0.tar.gz(r-4.6-x86_64)
dppca_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
dppca/json (API)

# Install 'dppca' in R:
install.packages('dppca', repos = c('https://yejinjo0220.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/yejinjo0220/dppca/issues

Pkgdown/docs site:https://yejinjo0220.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • gau - Five Gaussian Cluster Dataset
  • gau_g - Five Gaussian Cluster Dataset with Group Labels
  • vowel - Vowel Recognition Dataset

On CRAN:

Conda:

cpp

6.64 score 2 stars 308 downloads 13 exports 23 dependencies

Last updated from:a924151208. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK135
linux-devel-x86_64OK180
source / vignettesOK370
linux-release-arm64OK132
linux-release-x86_64OK167
macos-release-arm64OK100
macos-release-x86_64OK373
macos-oldrel-arm64OK127
macos-oldrel-x86_64OK246
windows-devel-arm64OK226
windows-devel-x86_64OK151
windows-release-arm64OK227
windows-release-x86_64OK123
windows-oldrel-x86_64OK116
wasm-releaseOK107

Exports:clipped_controldp_loadingdp_pcadp_scoredp_screedppca_apphuber_controlloading_plot_controlpmwm_controlprivacy_controlsampling_controlscore_plot_controlscree_plot_control

Dependencies:clicpp11farverggplot2ggrepelgluegtableisobandlabelinglifecyclepatchworkR6rbibutilsRColorBrewerRcppRdpackrlangS7scalesvctrsVGAMviridisLitewithr

Algorithms
Algorithm 1: Private and robust estimator for (m_2) | Algorithm 2: Unbounded DP upper-quantile estimator | Algorithm 3: Additive DP histogram | Algorithm 4: Sparse DP histogram | Algorithm 5: Group-wise additive DP histogram | Algorithm 6: Group-wise sparse DP histogram | References

Last update: 2026-10-28
Started: 2026-05-05

Differentially Private Eigenvalues
1. DP eigenvalue estimation | $$(\widetilde{\lambda}_1,\ldots,\widetilde{\lambda}_k) | 2. Clipped mean | 3. Private modified winsorized mean (PMWM) | 3.1. Allocation of pair rows | 3.2. Private quantiles and cutoff bounds | $$\zeta | $$L_\ell^ | \mathcal Q_ | $$L_\ell | \min{b,\max{a,L_\ell^{\mathrm{priv}}}},\qquadU_\ell | 3.3. Winsorized mean and Gaussian perturbation | 3.4. Privacy allocation and tuning choices | $$(\varepsilon_M,\delta_M) | 4. Huber mean | 4.1. Huber loss and score | 4.2. Private scale and Huber thresholds | $$\varepsilon_ | \frac | $$\tau_\ell | 4.3. Noisy gradient descent | 5. Nonnegative scree and PVE | 6. DP scree/PVE plots in dppca | References

Last update: 2026-10-28
Started: 2026-10-28

Differentially Private PC Directions
1. Spherical Kendall matrix and PC directions | Translation invariance | 2. DP PC directions | 3. DP loading plots in dppca | References

Last update: 2026-10-28
Started: 2026-10-28

Differentially Private PC Scores
1. Two-dimensional PC scores | 2. Private plotting frame | 2.1. Private coordinate medians | 2.2. Private radial quantile and square frame | 3. Histogram grid and sensitivity | 4. Private histogram estimators | 4.1. Additive Gaussian histogram | 4.2. Stability-based sparse histogram | 5. Privacy budget allocation | 6. Synthetic score sampling | 7. Group-wise private score histograms | 8.1. Display centering | $$c_\ell^ | References

Last update: 2026-10-28
Started: 2026-10-28

Differentially Private PCA Visualizations
1. What is estimated privately? | 2. Privacy budget and shared estimation | 3. Five DP PCA Visualization | 3.1. DP variable plot (correlation-style coordinates) | $$\operatorname{Cor}(X_{\cdot j},S_{\cdot\ell}) | $$\widetilde{\Sigma}_k | $$\widetilde{\sigma}_{j,k}^2 | (\widetilde | $$\widetilde | $$R_j^ | $$|R_j^{\mathrm{DP}}|_2^2 | \widetilde | 3.2. DP biplot | $$\widetilde{d}_\ell | $$G_{i\ell}^{\mathrm{DP}}(\alpha) | \frac{s_{i\ell}^*-c_\ell^{\mathrm{disp}}}{\widetilde{d}\ell^\alpha},\qquadH{j\ell}^{\mathrm{DP}}(\alpha) | For the two selected components, the rows $G_i^{\mathrm{DP}}(\alpha) | \left(G_{ia}^{\mathrm{DP}}(\alpha),G_{ib}^{\mathrm{DP}}(\alpha)\right)$represent synthetic observations, while $H_j^{\mathrm{DP}}(\alpha) | Let$$r_G | Q_{0.9}\left(\left{\left|G_i^{\mathrm{DP}}(\alpha) | $$r_H | $$\gamma | 4. Summary | References and further reading

Last update: 2026-10-28
Started: 2026-10-28

DP Loading Plots
1. Load the example data | 2. Set the privacy budget and estimate PC directions | 3. Inspect the result | 4. Plot the result | 4.1. Vector plot | 4.2. Point and heatmap plots | 5. Select PCs and variables | 6. Customize the appearance

Last update: 2026-10-28
Started: 2026-10-27

DP PCA Visualization
What you will make | 1. Load the vowel data | 2. Create the privacy allocation | 3. Fit DP PCA analysis | Main arguments of dp_pca() | 4. Inspect the results | 5. Create all five displays | 6. Reuse and export the results

Last update: 2026-10-28
Started: 2026-10-27

DP Score Plots
1. Load the example data | 2. Set the privacy budget and estimate a score histogram | 2.1. Additive and sparse methods | 3. Inspect and plot the result | 3.1. Read the fit and stored estimates | 3.2. Show a private histogram | 3.3. Draw synthetic score points | 4. Customize the plot | 5. Group-wise private score histograms | 5.1. Fit a private histogram for each group | 5.2. Plot a group histogram overlay

Last update: 2026-10-28
Started: 2026-10-27

DP Scree Plots
1. Load the example data | 2. Set the privacy budget and estimate scree values | 3. Inspect and plot the result | 4. Choose a method and its tuning parameters | Clipped mean | Private modified winsorized mean (PMWM) | Huber mean | 5. Compare multiple methods and account for releases | 6. Reusing Private PC Directions | 7. Customize the plot

Last update: 2026-10-28
Started: 2026-10-27

Getting Started with dppca
Choose a starting point | 1. Install and load the package | 2. Prepare your input data | 3. Explore the Example Datasets | 3.1. Gaussian data | 3.2. Vowel data | 4. Set and Allocate the Privacy Budget | 4.1. Default privacy budget allocation | 4.2. Customize the budget allocation | 4.3. Specify individual component budgets | 5. Next steps

Last update: 2026-10-28
Started: 2026-10-27

Interactive Shiny App
1. Available analyses | 2. Getting started | 3. Data and comparison options | 4. Run the app locally

Last update: 2026-10-28
Started: 2026-10-27

Principal Component Analysis
1. Introduction | 2. Population PCA | Let $\xi\in\mathbb{R}^p$ be a random vector with mean $\mu=E[\xi]$ and covariance matrix $\Sigma | 3. Sample PCA | [\widehat \Sigma | 3.1 Directions | [\widehat \Sigma \widehat v_\ell | 3.2 Eigenvalues | The eigenvalues of $\widehat \Sigma$ represent the sample variances along the corresponding PC directions. In particular,[\widehat\lambda_\ell | [\operatorname{PVE}_\ell | 3.3 Scores | where the $\ell$th PC score of observation $i$ is $s_ | 4. PCA visualizations | 4.1 Loading plot | 4.2 Scree plot | 4.3 Score plot | 4.4 Variable plot (correlation circle) | A variable plot displays the correlations between the original variables and the PC scores. Let (\widehat \sigma_j=\sqrt{\widehat \Sigma_{jj}}) denote the sample standard deviation of variable (j). For (\widehat \sigma>0) and (\widehat\lambda_\ell>0), the sample correlation between variable (j) and the (\ell)th PC scores is[\operatorname{Cor}(X_{\cdot j},S_{\cdot\ell}) | Since $|R_j|_2^2 | 4.5 Biplot | Summary of PCA visualizations | References

Last update: 2026-10-28
Started: 2026-10-28

Readme and manuals

Help Manual

Help pageTopics
Control options for clipped scree estimationclipped_control
Estimate differentially private PC directionsdp_loading print.dp_loading print.summary.dp_loading summary.dp_loading
Estimate shared PCA quantities oncedp_pca print.dp_pca print.summary.dp_pca summary.dp_pca
Differentially private score histogramsdp_score print.dp_score print.dp_score_group print.summary.dp_score summary.dp_score summary.dp_score_group
Differentially private scree valuesdp_scree print.dp_scree print.summary.dp_scree summary.dp_scree
Launch the dppca Shiny appdppca_app
Five Gaussian Cluster Datasetgau
Five Gaussian Cluster Dataset with Group Labelsgau_g
Control options for Huber scree estimationhuber_control
Control loading plot appearanceloading_plot_control
Plot stored private PC directionsplot.dp_loading plot.dp_loading_plot print.dp_loading_plot summary.dp_loading_plot
Plot an integrated PCA fitplot.dp_pca
Plot a stored private score histogramplot.dp_score plot.dp_score_plot print.dp_score_plot summary.dp_score_plot
Plot stored group-wise private score histogramsplot.dp_score_group plot.dp_score_plot_group print.dp_score_plot_group summary.dp_score_plot_group
Plot stored private scree estimatesplot.dp_scree
Control options for private modified winsorized scree estimationpmwm_control
Allocate privacy budgets for shared PCA estimationprivacy_control
Control options for synthetic score samplingsampling_control
Control options for score plotsscore_plot_control
Control options for scree and PVE plotsscree_plot_control
Vowel Recognition Datasetvowel