[mlpack-git] master: Test with arma::chol() not arma::det(). (a263be4)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Dec 23 12:30:19 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/46c2d4abdb8a57480aec8db9b43fec31bc912300...a263be41587a5769ba4ac3d47b801555f7692731
>---------------------------------------------------------------
commit a263be41587a5769ba4ac3d47b801555f7692731
Author: ryan <ryan at ratml.org>
Date: Wed Dec 23 12:30:06 2015 -0500
Test with arma::chol() not arma::det().
>---------------------------------------------------------------
a263be41587a5769ba4ac3d47b801555f7692731
src/mlpack/tests/gmm_test.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/tests/gmm_test.cpp b/src/mlpack/tests/gmm_test.cpp
index 628e03f..09df0ea 100644
--- a/src/mlpack/tests/gmm_test.cpp
+++ b/src/mlpack/tests/gmm_test.cpp
@@ -559,7 +559,8 @@ BOOST_AUTO_TEST_CASE(NoConstraintTest)
BOOST_AUTO_TEST_CASE(PositiveDefiniteConstraintTest)
{
- // Make sure matrices are made to be positive definite.
+ // Make sure matrices are made to be positive definite, or more specifically,
+ // that they can be Cholesky decomposed.
for (size_t i = 0; i < 30; ++i)
{
const size_t elem = 5 + math::RandInt(50);
@@ -568,7 +569,8 @@ BOOST_AUTO_TEST_CASE(PositiveDefiniteConstraintTest)
PositiveDefiniteConstraint::ApplyConstraint(cov);
- BOOST_REQUIRE_GE((double) det(cov), 1e-50);
+ arma::mat c;
+ BOOST_REQUIRE(arma::chol(c, cov));
}
}
More information about the mlpack-git
mailing list