3
$\begingroup$

I'm looking for a matrix factorization method that is able to decompose a matrix:

V => W * H
  • V has dimensions m*n
  • W has dimensions m*k
  • H has dimensions k*n
  • V, W, and H can have negative values.
  • comes with an implementation in either R, Python, or C/++

I.e., something like Non-negative matrix factorization that allows negative values.

Does anyone have a hint?

$\endgroup$
  • $\begingroup$ Have you considered singular value decomposition? If $\Sigma$ has $k$ or fewer non-zero singular values, you can compute a $W$ and $H$ direct from the SVD, such as $W=U\Sigma^\frac{1}{2}$ and $H=\Sigma^\frac{1}{2}V^*$ $\endgroup$ – Glen_b -Reinstate Monica Sep 14 '14 at 17:16
  • $\begingroup$ Thanks for the hint, I thought that one possible answer would be some variant of SVD. Unfortunately my linear algebra is so rusty that I didn't see it myself - if you add this as an answer I will accept it. $\endgroup$ – Michael Schubert Sep 17 '14 at 20:02
4
$\begingroup$

You could consider a singular value decomposition.

If $\Sigma$ has $k$ or fewer non-zero singular values, you can compute a $W$ and $H$ direct from the SVD, such as $W=U\Sigma^\frac{1}{2}$ and $H=\Sigma^\frac{1}{2}V^∗$.

With the diagonal of $\Sigma$ ordered such that the zeroes are all at the later diagonals, columns of $W$ after the $k$-th will be all-zero (and similarly columns of $H$) and can be dropped without changing the product.

$\endgroup$

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.