[mlpack] 319/324: Scale the transformed data matrix.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:22 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit 504be0345f848ba5bf87b00319c828d2270e9de9
Author: marcus <marcus at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Fri Aug 15 16:53:25 2014 +0000

    Scale the transformed data matrix.
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@17032 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/methods/kernel_pca/kernel_rules/naive_method.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/methods/kernel_pca/kernel_rules/naive_method.hpp b/src/mlpack/methods/kernel_pca/kernel_rules/naive_method.hpp
index 7a97f34..a243739 100644
--- a/src/mlpack/methods/kernel_pca/kernel_rules/naive_method.hpp
+++ b/src/mlpack/methods/kernel_pca/kernel_rules/naive_method.hpp
@@ -16,7 +16,6 @@ namespace kpca {
 template<typename KernelType>
 class NaiveKernelRule
 {
- public:
   public:
     /**
      * Construct the kernel matrix approximation using the nystroem method.
@@ -80,6 +79,7 @@ class NaiveKernelRule
     eigvec = arma::fliplr(eigvec);
 
     transformedData = eigvec.t() * kernelMatrix;
+    transformedData.each_col() /= arma::sqrt(eigval);
   }
 };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list