[mlpack-git] master, mlpack-1.0.x: Avoid direct multiplication with a diagmat. (e117a71)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:53:48 EST 2015
Repository : https://github.com/mlpack/mlpack
On branches: master,mlpack-1.0.x
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit e117a716c30a88e89260b0a11afa93e02f29e75c
Author: Marcus Edel <marcus.edel at fu-berlin.de>
Date: Sun Jul 20 10:42:27 2014 +0000
Avoid direct multiplication with a diagmat.
>---------------------------------------------------------------
e117a716c30a88e89260b0a11afa93e02f29e75c
src/mlpack/methods/nystroem_method/nystroem_method_impl.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/methods/nystroem_method/nystroem_method_impl.hpp b/src/mlpack/methods/nystroem_method/nystroem_method_impl.hpp
index 02f4fc2..231ecbf 100644
--- a/src/mlpack/methods/nystroem_method/nystroem_method_impl.hpp
+++ b/src/mlpack/methods/nystroem_method/nystroem_method_impl.hpp
@@ -81,8 +81,8 @@ void NystroemMethod<KernelType, PointSelectionPolicy>::Apply(arma::mat& output)
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-git
mailing list