single.bdsvd: Single Iteration of Block Detection Using Singular Vectors...

View source: R/bdsvd.R

single.bdsvdR Documentation

Single Iteration of Block Detection Using Singular Vectors (BD-SVD).

Description

Performs a single iteration of BD-SVD: splits the data matrix into one (i.e., no split) or two submatrices, depending on the structure of the first sparse loading v (which is a sparse approximation of the first right singular vector, i.e., a vector with many zero values) that mirrors the shape of the covariance matrix.

Usage

single.bdsvd(X, dof, standardize = TRUE, max.iter)

Arguments

X

Data matrix of dimension n x p with possibly p >> n.

dof

Number of non-zero components in the sparse loading (degrees of freedom). If S denotes the support of v, then the cardinality of the support, |S|, corresponds to the degrees of freedom.

standardize

Standardize the data to have unit variance. Default is TRUE.

max.iter

How many iterations should be performed for computing the sparse loading. Default is 200.

Details

The sparse loadings are computed using the method proposed by Shen & Huang (2008). The corresponding implementation is written in Rcpp/RcppArmadillo for computational efficiency and is based on the R implementation by Baglama, Reichel, and Lewis in ssvd irlba. However, the implementation has been adapted to better align with the scope of the bdsvd package.

Value

A list containing the feature names of the submatrices of X. It is either of length one (no split) or length two (split into two submatrices).

References

Bauer, J.O. (2025). High-dimensional block diagonal covariance structure detection using singular vectors, J. Comput. Graph. Stat., 34(3), 1005–1016

Shen, H. and Huang, J.Z. (2008). Sparse principal component analysis via regularized low rank matrix approximation, J. Multivar. Anal. 99, 1015–1034.

See Also

bdsvd, bdsvd.ht

Examples

#Replicate the illustrative example from Bauer (2025).

## Not run: 

p <- 300 #Number of variables. In Bauer (2025), p = 3000.
n <- 500 #Number of observations
b <- 3   #Number of blocks
design <- "c"

#Simulate data matrix X
set.seed(1)
Sigma <- bdsvd.cov.sim(p = p, b = b, design = design)
X <- mvtnorm::rmvnorm(n, mean = rep(0, p), sigma = Sigma)
colnames(X) <- 1:p

ht <- bdsvd.ht(X)
plot(0:(p-1), ht$BIC[,1], xlab = "|S|", ylab = "HBIC", main = "", type = "l")
single.bdsvd(X, dof = ht$dof, standardize = FALSE)


## End(Not run)


bdsvd documentation built on March 26, 2026, 5:10 p.m.