[mlpack] 84/324: Easy fix for #355.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:21:58 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 ed93d58cc8d5e6a423da0889b8cc488f00947048
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Thu Jun 26 22:39:06 2014 +0000

    Easy fix for #355.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16722 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/methods/kernel_pca/kernel_pca_impl.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/methods/kernel_pca/kernel_pca_impl.hpp b/src/mlpack/methods/kernel_pca/kernel_pca_impl.hpp
index b607d70..9e65845 100644
--- a/src/mlpack/methods/kernel_pca/kernel_pca_impl.hpp
+++ b/src/mlpack/methods/kernel_pca/kernel_pca_impl.hpp
@@ -44,8 +44,8 @@ void KernelPCA<KernelType>::Apply(const arma::mat& data,
   // center the data. So, we perform a "psuedo-centering" using the kernel
   // matrix.
   arma::rowvec rowMean = arma::sum(kernelMatrix, 0) / kernelMatrix.n_cols;
-  kernelMatrix.each_row() -= rowMean;
   kernelMatrix.each_col() -= arma::sum(kernelMatrix, 1) / kernelMatrix.n_cols;
+  kernelMatrix.each_row() -= rowMean;
   kernelMatrix += arma::sum(rowMean) / kernelMatrix.n_cols;
 
   // Eigendecompose the centered kernel matrix.

-- 
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