[mlpack-git] master: Merge pull request #457 from stereomatchingkiss/softmax_enhance (dc2c5c6)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Sep 30 09:27:27 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/8a8b708650f72c2aecbd9b4a12c8b16b4e0a3508...dc2c5c68dc4bfcdd2075b1a0fd2d641fce651669
>---------------------------------------------------------------
commit dc2c5c68dc4bfcdd2075b1a0fd2d641fce651669
Merge: 8a8b708 8692a76
Author: Ryan Curtin <ryan at ratml.org>
Date: Wed Sep 30 09:27:15 2015 -0400
Merge pull request #457 from stereomatchingkiss/softmax_enhance
Enhance SoftmaxRegression
>---------------------------------------------------------------
dc2c5c68dc4bfcdd2075b1a0fd2d641fce651669
.../softmax_regression/softmax_regression.hpp | 20 ++++----
.../softmax_regression_function.cpp | 36 ++++++++++-----
.../softmax_regression_function.hpp | 48 ++++++++++++++------
.../softmax_regression/softmax_regression_impl.hpp | 23 ++++------
src/mlpack/tests/serialization_test.cpp | 8 ++--
src/mlpack/tests/softmax_regression_test.cpp | 53 +++++++++++-----------
6 files changed, 106 insertions(+), 82 deletions(-)
diff --cc src/mlpack/tests/softmax_regression_test.cpp
index 38cded2,a5e12f8..4fedcf3
--- a/src/mlpack/tests/softmax_regression_test.cpp
+++ b/src/mlpack/tests/softmax_regression_test.cpp
@@@ -402,11 -400,11 +401,11 @@@ BOOST_AUTO_TEST_CASE(SoftmaxRegressionO
BOOST_REQUIRE_EQUAL(sr.Parameters().n_cols, sr2.Parameters().n_cols);
for (size_t i = 0; i < sr.Parameters().n_elem; ++i)
{
- if (std::abs(sr.Parameters()[i]) < 0.01)
- BOOST_REQUIRE_SMALL(sr2.Parameters()[i], 0.01);
+ if (std::abs(sr.Parameters()[i]) < 1e-5)
+ BOOST_REQUIRE_SMALL(sr2.Parameters()[i], 1e-5);
else
- BOOST_REQUIRE_CLOSE(sr.Parameters()[i], sr2.Parameters()[i], 0.01);
+ BOOST_REQUIRE_CLOSE(sr.Parameters()[i], sr2.Parameters()[i], 1e-5);
}
- }
+ }//*/
BOOST_AUTO_TEST_SUITE_END();
More information about the mlpack-git
mailing list