[mlpack-git] master: Warn if ratings of 0 are found (7c2c295)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:11:40 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit 7c2c29503c7a4b8464ff3db72ce1f9d493ae2722
Author: Stephen Tu <tu.stephenl at gmail.com>
Date: Sun Jan 11 14:48:29 2015 -0800
Warn if ratings of 0 are found
these ratings will be ignored
>---------------------------------------------------------------
7c2c29503c7a4b8464ff3db72ce1f9d493ae2722
src/mlpack/methods/cf/cf_impl.hpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mlpack/methods/cf/cf_impl.hpp b/src/mlpack/methods/cf/cf_impl.hpp
index 53b0a05..df3b8b9 100644
--- a/src/mlpack/methods/cf/cf_impl.hpp
+++ b/src/mlpack/methods/cf/cf_impl.hpp
@@ -207,6 +207,9 @@ void CF<FactorizerType>::CleanData(const arma::mat& data)
locations(1, i) = ((arma::uword) data(0, i));
locations(0, i) = ((arma::uword) data(1, i));
values(i) = data(2, i);
+ if (values(i) == 0)
+ Log::Warn << "User rating of 0 ignored for user "
+ << locations(1, i) << ", item " << locations(0, i) << std::endl;
}
// Find maximum user and item IDs.
More information about the mlpack-git
mailing list