[mlpack-git] master,mlpack-1.0.x: Minor changes to tests; in some cases matrices/vectors are now initialized so they provide more output. (6fe2dde)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:43:16 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 6fe2dde181b4818d879dd6661597414472dea705
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Feb 10 15:00:21 2014 +0000
Minor changes to tests; in some cases matrices/vectors are now initialized so
they provide more output.
>---------------------------------------------------------------
6fe2dde181b4818d879dd6661597414472dea705
src/mlpack/tests/to_string_test.cpp | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/src/mlpack/tests/to_string_test.cpp b/src/mlpack/tests/to_string_test.cpp
index c7dbbef..359e776 100644
--- a/src/mlpack/tests/to_string_test.cpp
+++ b/src/mlpack/tests/to_string_test.cpp
@@ -151,8 +151,8 @@ BOOST_AUTO_TEST_CASE(PolynomialKernelString)
BOOST_AUTO_TEST_CASE(PSpectrumStringKernelString)
{
const std::vector<std::vector<std::string> > s;
- const size_t t=1;
- PSpectrumStringKernel d(s,t);
+ const size_t t = 1;
+ PSpectrumStringKernel d(s, t);
Log::Debug << d;
std::string sttm = d.ToString();
BOOST_REQUIRE_NE(sttm, "");
@@ -203,7 +203,7 @@ BOOST_AUTO_TEST_CASE(SGDString)
const arma::mat g(2, 2);
const arma::Col<size_t> v(2);
SoftmaxErrorFunction<> a(g, v);
- mlpack::optimization::SGD<SoftmaxErrorFunction<> > d(a);
+ mlpack::optimization::SGD<SoftmaxErrorFunction<> > d(a);
Log::Debug << d;
std::string s = d.ToString();
BOOST_REQUIRE_NE(s, "");
@@ -214,7 +214,7 @@ BOOST_AUTO_TEST_CASE(L_BFGSString)
const arma::mat g(2, 2);
const arma::Col<size_t> v(2);
SoftmaxErrorFunction<> a(g, v);
- mlpack::optimization::L_BFGS<SoftmaxErrorFunction<> > d(a);
+ mlpack::optimization::L_BFGS<SoftmaxErrorFunction<> > d(a);
Log::Debug << d;
std::string s = d.ToString();
BOOST_REQUIRE_NE(s, "");
@@ -222,11 +222,9 @@ BOOST_AUTO_TEST_CASE(L_BFGSString)
BOOST_AUTO_TEST_CASE(AugLagString)
{
- mlpack::optimization::AugLagrangianTestFunction a;
- mlpack::optimization::AugLagrangianFunction
- <mlpack::optimization::AugLagrangianTestFunction> q(a);
- mlpack::optimization::AugLagrangian
- <mlpack::optimization::AugLagrangianTestFunction> d(a);
+ mlpack::optimization::AugLagrangianTestFunction a;
+ mlpack::optimization::AugLagrangian<
+ mlpack::optimization::AugLagrangianTestFunction> d(a);
Log::Debug << d;
std::string s = d.ToString();
BOOST_REQUIRE_NE(s, "");
@@ -234,7 +232,7 @@ BOOST_AUTO_TEST_CASE(AugLagString)
BOOST_AUTO_TEST_CASE(BallBoundString)
{
- BallBound<> d;
+ BallBound<> d(3.5, "1.0 2.0");
Log::Debug << d;
std::string s = d.ToString();
BOOST_REQUIRE_NE(s, "");
@@ -242,7 +240,7 @@ BOOST_AUTO_TEST_CASE(BallBoundString)
BOOST_AUTO_TEST_CASE(BinSpaceString)
{
- arma::mat q(2, 2);
+ arma::mat q(2, 50);
q.randu();
BinarySpaceTree<HRectBound<1> > d(q);
Log::Debug << d;
More information about the mlpack-git
mailing list