0
$\begingroup$

Hibbs et. al use SVD to balance the strength of different underlying signals in gene expression data using the following decomposition:

$X_{m*n} = U_{m*n} \Sigma_{n*n} V^T_{n*n}$

In this case $U$ has the same dimensions as $X$, so the way that they see $U$ as a balanced projection of $X$ makes sense.

I'd like to use the same approach in R. However, the svd package decomposes $X$ into $D_{m}, U_{m*m}, V_{n*m}$. This is not too surprising given that Mathworld also mentions different conventions, however, I see no equivalent for the $U$ matrix of the first definition.

Is there an R implementation of Press' definition available, or is there a way to convert one in the other?

$\endgroup$
1
$\begingroup$

In $X=UDV^t$, $D$ is diagonal, and only the upper-left square of $D$, of size $\min(m,n)\times\min(m,n)$, is non-zero.

The two SVD decompositions are equivalent in the sense that if you drop the right-most zero columns (or bottom-most zero rows) from $D$, and also drop the corresponding rows/columns from $U$ or $V$, you get the other definition of SVD.

$\endgroup$
1
  • $\begingroup$ To add to this: base::svd already does the composition that I was looking for, svd::svd does the other one. $\endgroup$ Jul 25 '14 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.