GMD: Generalized Matrix Decomposition

Description Usage Arguments Details Value Author(s) References Examples

View source: R/GMD.R

Description

Computes the generalized matrix decomposition of X.

Usage

1
GMD(X, H, Q, K)

Arguments

X

An n x p data matrix.

H

An n x n positive semi-definite similarity kernel.

Q

An p x p positive semi-definite similarity kernel.

K

a scalar specifying the dimension of GMD components (see Details).

Details

The K-dimensional GMD of X with respect to H and Q is given by X = USV^T, where

(U, S, V) = argmin_{U,S,V} ||X - USV^T||^2_{H, Q},

subject to U^THU = I_K, V^TQV = I_K and diag(S) ≥ 0. Here, for any n x p matrix A, ||A||^2_H,Q = tr(A^THAQ).

Value

A list of the GMD components U, S, V, H and Q (see Details).

Author(s)

Parker Knight and Yue Wang ywang2310@fredhutch.org

References

Allen, G. I., L. Grosenick, and J. Taylor (2014). A generalized least-square matrix decom- position. Journal of the American Statistical Association 109(505), 145–159.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
   X = matrix(rnorm(1000), 50, 20)
   autocorr.mat <- function(p, rho) {
     mat <- diag(p)
     return(rho^abs(row(mat)-col(mat)))
     }
   H = autocorr.mat(50, 0.6)
   Q = autocorr.mat(20, 0.7)
   GMD.fit = GMD(X, H, Q, 2)
   
## End(Not run)

taryue/GMDecomp documentation built on Nov. 5, 2019, 10 a.m.