[mlpack] 140/324: Rename for slightly changed API.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit 72754b4fb4c7c3f76cbf0e2145a250121832f46c
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Tue Jul 8 11:28:11 2014 +0000

    Rename for slightly changed API.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16779 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/tests/svd_test.cpp | 60 +++++++++++++++++++++----------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/src/mlpack/tests/svd_test.cpp b/src/mlpack/tests/svd_test.cpp
index 9b9f03f..388a3cd 100644
--- a/src/mlpack/tests/svd_test.cpp
+++ b/src/mlpack/tests/svd_test.cpp
@@ -44,26 +44,26 @@ BOOST_AUTO_TEST_CASE(SVDMomentumTest)
 
   math::RandomSeed(10);
   ValidationRMSETermination<sp_mat> vrt(cleanedData, 2000);
-  AMF<ValidationRMSETermination<sp_mat>, 
-      RandomInitialization, 
-      SVDBatchLearning> amf_1(vrt, 
-                              RandomInitialization(), 
+  AMF<ValidationRMSETermination<sp_mat>,
+      RandomInitialization,
+      SVDBatchLearning> amf_1(vrt,
+                              RandomInitialization(),
                               SVDBatchLearning(0.0009, 0, 0, 0));
-  
+
   mat m1,m2;
   size_t RMSE_1 = amf_1.Apply(cleanedData, 2, m1, m2);
-  size_t iter_1 = amf_1.TPolicy().Iteration();
-  
+  size_t iter_1 = amf_1.TerminationPolicy().Iteration();
+
   math::RandomSeed(10);
-  AMF<ValidationRMSETermination<sp_mat>, 
-      RandomInitialization, 
-      SVDBatchLearning> amf_2(vrt, 
-                              RandomInitialization(), 
+  AMF<ValidationRMSETermination<sp_mat>,
+      RandomInitialization,
+      SVDBatchLearning> amf_2(vrt,
+                              RandomInitialization(),
                               SVDBatchLearning(0.0009, 0, 0, 0.8));
-                              
+
   size_t RMSE_2 = amf_2.Apply(cleanedData, 2, m1, m2);
-  size_t iter_2 = amf_2.TPolicy().Iteration();
-  
+  size_t iter_2 = amf_2.TerminationPolicy().Iteration();
+
   BOOST_REQUIRE_LE(RMSE_2, RMSE_1);
   BOOST_REQUIRE_LE(iter_2, iter_1);
 }
@@ -97,24 +97,24 @@ BOOST_AUTO_TEST_CASE(SVDRegularizationTest)
 
   math::RandomSeed(10);
   ValidationRMSETermination<sp_mat> vrt(cleanedData, 2000);
-  AMF<ValidationRMSETermination<sp_mat>, 
-      RandomInitialization, 
-      SVDBatchLearning> amf_1(vrt, 
-                              RandomInitialization(), 
+  AMF<ValidationRMSETermination<sp_mat>,
+      RandomInitialization,
+      SVDBatchLearning> amf_1(vrt,
+                              RandomInitialization(),
                               SVDBatchLearning(0.0009, 0, 0, 0));
-  
+
   mat m1,m2;
   size_t RMSE_1 = amf_1.Apply(cleanedData, 2, m1, m2);
-  
+
   math::RandomSeed(10);
-  AMF<ValidationRMSETermination<sp_mat>, 
-      RandomInitialization, 
-      SVDBatchLearning> amf_2(vrt, 
-                              RandomInitialization(), 
+  AMF<ValidationRMSETermination<sp_mat>,
+      RandomInitialization,
+      SVDBatchLearning> amf_2(vrt,
+                              RandomInitialization(),
                               SVDBatchLearning(0.0009, 0.5, 0.5, 0.8));
-                              
+
   size_t RMSE_2 = amf_2.Apply(cleanedData, 2, m1, m2);
-  
+
   BOOST_REQUIRE_LE(RMSE_2, RMSE_1);
 }
 
@@ -135,8 +135,8 @@ BOOST_AUTO_TEST_CASE(SVDNegativeElementTest)
   test(2, 1) = 2;
   test(2, 2) = 2;
 
-  AMF<SimpleToleranceTermination<mat>, 
-      RandomInitialization, 
+  AMF<SimpleToleranceTermination<mat>,
+      RandomInitialization,
       SVDBatchLearning> amf(SimpleToleranceTermination<mat>(),
                             RandomInitialization(),
                             SVDBatchLearning(0.3, 0.001, 0.001, 0));
@@ -144,9 +144,9 @@ BOOST_AUTO_TEST_CASE(SVDNegativeElementTest)
   amf.Apply(test, 2, m1, m2);
 
   arma::mat result = m1 * m2;
-  
+
   std::cout << result << std::endl;
-  
+
   for(size_t i = 0;i < 3;i++)
   {
     for(size_t j = 0;j < 3;j++)

-- 
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