[mlpack-svn] r16841 - mlpack/trunk/src/mlpack/methods/nystroem_method

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Sun Jul 20 06:42:27 EDT 2014


Author: marcus
Date: Sun Jul 20 06:42:27 2014
New Revision: 16841

Log:
Avoid direct multiplication with a diagmat.

Modified:
   mlpack/trunk/src/mlpack/methods/nystroem_method/nystroem_method_impl.hpp

Modified: mlpack/trunk/src/mlpack/methods/nystroem_method/nystroem_method_impl.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/methods/nystroem_method/nystroem_method_impl.hpp	(original)
+++ mlpack/trunk/src/mlpack/methods/nystroem_method/nystroem_method_impl.hpp	Sun Jul 20 06:42:27 2014
@@ -81,8 +81,8 @@
   arma::svd(U, s, V, miniKernel);
 
   // Construct the output matrix.
-  arma::mat normalization = (U * arma::diagmat(1.0 / sqrt(s)));
-  output = semiKernel * normalization * V;
+  arma::mat normalization = arma::diagmat(1.0 / sqrt(s));
+  output = semiKernel * U * normalization * V;
 }
 
 }; // namespace kernel



More information about the mlpack-svn mailing list