[mlpack] 35/44: Update test with trunk (somehow I did not merge it right).
Barak A. Pearlmutter
barak+git at pearlmutter.net
Mon Feb 15 19:35:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to tag mlpack-1.0.11
in repository mlpack.
commit 7b561a8ffb7f87213538a1f57600f6017b70b928
Author: Ryan Curtin <ryan at ratml.org>
Date: Mon Dec 8 13:56:38 2014 +0000
Update test with trunk (somehow I did not merge it right).
---
src/mlpack/tests/logistic_regression_test.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/mlpack/tests/logistic_regression_test.cpp b/src/mlpack/tests/logistic_regression_test.cpp
index 69046f3..9db9328 100644
--- a/src/mlpack/tests/logistic_regression_test.cpp
+++ b/src/mlpack/tests/logistic_regression_test.cpp
@@ -510,8 +510,11 @@ BOOST_AUTO_TEST_CASE(LogisticRegressionSGDSimpleTest)
"1 2 3");
arma::vec responses("1 1 0");
- // Create a logistic regression object using SGD.
- LogisticRegression<SGD> lr(data, responses);
+ // Create a logistic regression object using a custom SGD object with a much
+ // smaller tolerance.
+ LogisticRegressionFunction lrf(data, responses, 0.001);
+ SGD<LogisticRegressionFunction> sgd(lrf, 0.01, 100000, 1e-10);
+ LogisticRegression<SGD> lr(sgd);
// Test sigmoid function.
arma::vec sigmoids = 1 / (1 + arma::exp(-lr.Parameters()[0]
@@ -600,7 +603,6 @@ BOOST_AUTO_TEST_CASE(LogisticRegressionLBFGSGaussianTest)
// Ensure that the error is close to zero.
const double acc = lr.ComputeAccuracy(data, responses);
-
BOOST_REQUIRE_CLOSE(acc, 100.0, 0.3); // 0.3% error tolerance.
// Create a test set.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list