bwproj: Bures-Wasserstein Projection

View source: R/bwproj.R

bwprojR Documentation

Bures-Wasserstein Projection

Description

Projects a set of high-dimensional Gaussian distributions specified by their means and covariance matrices onto a lower-dimensional subspace using the distance-preserving projection method.

Usage

bwproj(means, covs, target_dim = 2, max_iter = 100, verbose = TRUE)

Arguments

means

an (n,p) matrix of Gaussian means, where n is the number of Gaussians and p is the original dimension.

covs

a (p,p,n) array of Gaussian covariance matrices.

target_dim

an integer specifying the target lower dimension d (default is 2).

max_iter

an integer specifying the maximum number of iterations for the optimization (default is 100).

verbose

a logical flag indicating whether to print progress messages (default is TRUE).

Value

a named list containing

U

the (p,d) projection matrix mapping original space to the lower-dimensional space.

proj_means

the (n,d) matrix of projected Gaussian means.

proj_covs

the (d,d,n) array of projected Gaussian covariance matrices.

iter_obj

a vector of objective function values at each iteration.

iter_gnorm

a vector of gradient norms at each iteration.


maotai documentation built on Jan. 13, 2026, 9:07 a.m.