[mlpack-git] master: Add tests for Train() overloads and empty constructor. (51205e0)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Mon Dec 21 15:25:55 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/be72510a765362f86782a8892f0e979aaa4a9f62...51205e0ad285b2cf421546d8876fc63e994f2d73
>---------------------------------------------------------------
commit 51205e0ad285b2cf421546d8876fc63e994f2d73
Author: ryan <ryan at ratml.org>
Date: Mon Dec 21 15:25:36 2015 -0500
Add tests for Train() overloads and empty constructor.
>---------------------------------------------------------------
51205e0ad285b2cf421546d8876fc63e994f2d73
src/mlpack/tests/cf_test.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/mlpack/tests/cf_test.cpp b/src/mlpack/tests/cf_test.cpp
index aaf4e2c..8aad547 100644
--- a/src/mlpack/tests/cf_test.cpp
+++ b/src/mlpack/tests/cf_test.cpp
@@ -324,7 +324,8 @@ BOOST_AUTO_TEST_CASE(CFBatchPredictTest)
BOOST_AUTO_TEST_CASE(TrainTest)
{
// Generate random data.
- arma::mat randomData = arma::randu<arma::mat>(100, 100);
+ arma::sp_mat randomData;
+ randomData.sprandu(100, 100, 0.3);
CF c(randomData);
// Now retrain with data we know about.
@@ -369,7 +370,7 @@ BOOST_AUTO_TEST_CASE(TrainTest)
CF::CleanData(dataset, cleanedData);
// Now retrain.
- c.Train(cleanedData);
+ c.Train(dataset);
// Get predictions for all user/item pairs we held back.
arma::Mat<size_t> combinations(2, savedCols.n_cols);
More information about the mlpack-git
mailing list