[mlpack-git] master: Old Armadillo versions needed a second parameter for norm, it seems. (9f0d3b3)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Fri Jun 26 18:24:38 EDT 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/14366a2bf0b91e5013783c60a7f45a0e5f7aaf85...9f0d3b30c469a3a535d3672b70c88aacbb2753c1

>---------------------------------------------------------------

commit 9f0d3b30c469a3a535d3672b70c88aacbb2753c1
Author: ryan <ryan at ratml.org>
Date:   Fri Jun 26 18:24:26 2015 -0400

    Old Armadillo versions needed a second parameter for norm, it seems.


>---------------------------------------------------------------

9f0d3b30c469a3a535d3672b70c88aacbb2753c1
 src/mlpack/methods/cf/cf_main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/methods/cf/cf_main.cpp b/src/mlpack/methods/cf/cf_main.cpp
index 09cc435..b460d8e 100644
--- a/src/mlpack/methods/cf/cf_main.cpp
+++ b/src/mlpack/methods/cf/cf_main.cpp
@@ -127,7 +127,7 @@ void ComputeRMSE(Factorizer&& factorizer,
   // points to get the RMSE.  It turns out this is just the L2-norm divided by
   // the square root of the number of points, if we interpret the predictions
   // and the true values as vectors.
-  const double rmse = arma::norm(predictions - testData.row(2).t()) /
+  const double rmse = arma::norm(predictions - testData.row(2).t(), 2) /
       std::sqrt((double) testData.n_cols);
 
   Log::Info << "RMSE is " << rmse << "." << endl;



More information about the mlpack-git mailing list