You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by bu...@apache.org on 2014/03/10 08:40:57 UTC

svn commit: r900863 - in /websites/staging/mahout/trunk/content: ./ users/dim-reduction/ssvd.html

Author: buildbot
Date: Mon Mar 10 07:40:57 2014
New Revision: 900863

Log:
Staging update by buildbot for mahout

Modified:
    websites/staging/mahout/trunk/content/   (props changed)
    websites/staging/mahout/trunk/content/users/dim-reduction/ssvd.html

Propchange: websites/staging/mahout/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon Mar 10 07:40:57 2014
@@ -1 +1 @@
-1575855
+1575857

Modified: websites/staging/mahout/trunk/content/users/dim-reduction/ssvd.html
==============================================================================
--- websites/staging/mahout/trunk/content/users/dim-reduction/ssvd.html (original)
+++ websites/staging/mahout/trunk/content/users/dim-reduction/ssvd.html Mon Mar 10 07:40:57 2014
@@ -255,6 +255,7 @@ x<span class="o">&lt;-</span> usim <span
 
 <p>and try to compare ssvd.svd(x) and stock svd(x) performance for the same rank k, notice the difference in the running time. Also play with power iterations (qIter) and compare accuracies of standard svd and SSVD.</p>
 <p>Note: numerical stability of R algorithms may differ from that of Mahout's distributed version. We haven't studied accuracy of the R simulation. For study of accuracy of Mahout's version, please refer to Nathan's dissertation as referenced above.</p>
+<h4 id="modified-ssvd-algorithm">Modified SSVD Algorithm.</h4>
 <p>Given an <code>\(m\times n\)</code>
 matrix <code>\(\mathbb{A}\)</code>, a target rank <code>\(k\in\mathbb{N}_{1}\)</code>
 , an oversampling parameter <code>\(p\in\mathbb{N}_{1}\)</code>, 
@@ -262,28 +263,53 @@ and the number of additional power itera
 this procedure computes an <code>\(m\times\left(k+p\right)\)</code>
 SVD <code>\(\mathbf{A\approx U}\boldsymbol{\Sigma}\mathbf{V}^{\top}\)</code>:</p>
 <ol>
-<li>Create seed for random <code>\(n\times\left(k+p\right)\)</code>
+<li>
+<p>Create seed for random <code>\(n\times\left(k+p\right)\)</code>
   matrix <code>\(\boldsymbol{\Omega}\)</code> The seed defines matrix <code>\(\mathbf{\Omega}\)</code>
-  using Gaussian unit vectors per one of suggestions in [Martinsson].</li>
+  using Gaussian unit vectors per one of suggestions in [Martinsson].</p>
+</li>
+<li>
+<p><code>\(\mathbf{Y=A\boldsymbol{\Omega}},\,\mathbf{Y}\in\mathbb{R}^{m\times\left(k+p\right)}\)</code></p>
+</li>
+<li>
+<p>Column-orthonormalize <code>\(\mathbf{Y}\rightarrow\mathbf{Q}\)</code>
+  by computing thin decomposition <code>\(\mathbf{Y}=\mathbf{Q}\mathbf{R}\)</code>
+  Also, <code>\(\mathbf{Q}\in\mathbb{R}^{m\times\left(k+p\right)},\,\mathbf{R}\in\mathbb{R}^{\left(k+p\right)\times\left(k+p\right)}\)</code>
+  I denote this as <code>\(\mathbf{Q}=\mbox{qr}\left(\mathbf{Y}\right).\mathbf{Q}\)</code></p>
+</li>
+<li>
+<p><code>\(\mathbf{B}_{0}=\mathbf{Q}^{\top}\mathbf{A}:\,\,\mathbf{B}\in\mathbb{R}^{\left(k+p\right)\times n}\)</code>
+ (Another way is <code>\(\mathbf{R}^{-1}\mathbf{Y}^{\top}\mathbf{A}\)</code>
+ , depending on whether we beleive if size of A less than size of Q).</p>
+</li>
+<li>
+<dl>
+<dt>If <code>\(q&gt;0\)</code></dt>
+<dt>repeat: for <code>\(i=1..q\)</code></dt>
+<dd><code>\(\mathbf{B}_{i}^{\top}=\mathbf{A}^{\top}\mbox{qr}\left(\mathbf{A}\mathbf{B}_{i-1}^{\top}\right).\mathbf{Q}\)</code>
+  (power iterations step)</dd>
+</dl>
+</li>
+<li>
+<p>Compute Eigensolution of a small Hermitian <code>\(\mathbf{B}_{q}\mathbf{B}_{q}^{\top}=\mathbf{\hat{U}}\boldsymbol{\Lambda}\mathbf{\hat{U}}^{\top}\)</code>
+  <code>\(\mathbf{B}_{q}\mathbf{B}_{q}^{\top}\in\mathbb{R}^{\left(k+p\right)\times\left(k+p\right)}\)</code></p>
+</li>
+<li>
+<p>Singular values <code>\(\mathbf{\boldsymbol{\Sigma}}=\boldsymbol{\Lambda}^{0.5}\)</code>
+  or, in other words, <code>\(s_{i}=\sqrt{\sigma_{i}}\)</code></p>
+</li>
+<li>
+<p>If needed, compute <code>\(\mathbf{U}=\mathbf{Q}\hat{\mathbf{U}}\)</code></p>
+</li>
+<li>
+<p>If needed, compute <code>\(\mathbf{V}=\mathbf{B}_{q}^{\top}\hat{\mathbf{U}}\boldsymbol{\Sigma}^{-1}\)</code>
+  .Another way is <code>\(\mathbf{V}=\mathbf{A}^{\top}\mathbf{U}\boldsymbol{\Sigma}^{-1}\)</code></p>
+</li>
 </ol>
-<script type="text/x-mathjax-config">
-MathJax.Hub.Config({
-    tex2jax: {
-        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
-    }
-});
-MathJax.Hub.Queue(function() {
-    var all = MathJax.Hub.getAllJax(), i;
-    for(i = 0; i < all.length; i += 1) {
-        all[i].SourceElement().parentNode.className += 'has-jax';
-    }
-});
-
-</script>
-
+<p></script>
 <script type="text/javascript"
   src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
-</script>
+</script></p>
    </div>
   </div>     
 </div>