Ensure a larger set of original singular values.

This commit is contained in:
ryan
2015-12-23 15:02:29 -05:00
parent a50bd2a5fb
commit 396f7f2160
+2 -1
View File
@@ -77,7 +77,8 @@ BOOST_AUTO_TEST_CASE(Rank10Test)
arma::svd(U, s, V, data);
// Don't set completely to 0; the hope is that K is still positive definite.
s.subvec(10, s.n_elem - 1).fill(1e-10);
s.subvec(0, 9) += 1.0; // Make sure the first 10 singular vectors are large.
s.subvec(10, s.n_elem - 1).fill(1e-6);
arma::mat dataMod = U * arma::diagmat(s) * V.t();
// Add some noise.