Learn R Programming

Exploratory Principal Component Analysis

epca is an R package for comprehending any data matrix that contains low-rank and sparse underlying signals of interest. The package currently features two key tools:

  • sca for sparse principal component analysis.
  • sma for sparse matrix approximation, a two-way data analysis for simultaneously row and column dimensionality reductions.

Installation

You can install the released version of epca from CRAN with:

install.packages("epca")

or the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("fchen365/epca")

Example

The usage of sca and sma is straightforward. For example, to find k sparse PCs of a data matrix X:

sca(X, k)

Similarly, we can find a rank-k sparse matrix decomposition by

sma(X, k)

For more examples, please see the vignette:

vignette("epca")

Getting help

If you encounter a clear bug, please file an issue with a minimal reproducible example on GitHub.

Reference

Chen F and Rohe K, “A New Basis for Sparse PCA.” (arXiv)

Copy Link

Version

Install

install.packages('epca')

Monthly Downloads

190

Version

1.1.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Fan Chen

Last Published

July 10th, 2023

Functions in epca (1.1.0)

norm.Lp

Element-wise Matrix Norm
misClustRate

Mis-Classification Rate (MCR)
polar

Polar Decomposition
print.sca

Print SCA
pitprops

Pitprops correlation data
pve

Proportion of Variance Explained (PVE)
varimax

Varimax Rotation
soft

Soft-thresholding
rootmatrix

Find root matrix
sma

Sparse Matrix Approximation
prs

Polar-Rotate-Shrink
varimax.criteria

The varimax criterion
vgQ.absmin

Gradient of Absmin Criterion
shrinkage

Shrinkage
rotation

Varimax Rotation
sca

Sparse Component Analysis
exp.frac

Calculate fractional exponent/power
hard

Hard-thresholding
distance

Matrix Distance
labelCluster

Label Cluster
inner

Matrix Inner Product
epca-package

Exploratory Principal Component Analysis
print.sma

Print SMA
cpve

Cumulative Proportion of Variance Explained (CPVE)
dist.matrix

Matrix Column Distance
permColumn

Permute columns of a block membership matrix
absmin.criteria

Absmin Criteria
absmin

Absmin Rotation