[mlpack-svn] r17055 - in mlpack/trunk/src/mlpack/methods: cf regularized_svd
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Sun Aug 17 06:20:50 EDT 2014
Author: siddharth.950
Date: Sun Aug 17 06:20:49 2014
New Revision: 17055
Log:
Minor documentation changes in CF.
Modified:
mlpack/trunk/src/mlpack/methods/cf/cf.hpp
mlpack/trunk/src/mlpack/methods/cf/cf_impl.hpp
mlpack/trunk/src/mlpack/methods/regularized_svd/regularized_svd.hpp
Modified: mlpack/trunk/src/mlpack/methods/cf/cf.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/methods/cf/cf.hpp (original)
+++ mlpack/trunk/src/mlpack/methods/cf/cf.hpp Sun Aug 17 06:20:49 2014
@@ -38,7 +38,7 @@
* If true, then the passed data matrix is used for factorizer.Apply().
* Otherwise, it is modified into a form suitable for factorization.
*/
- static const bool IsCleaned = false;
+ static const bool UsesCoordinateList = false;
};
/**
Modified: mlpack/trunk/src/mlpack/methods/cf/cf_impl.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/methods/cf/cf_impl.hpp (original)
+++ mlpack/trunk/src/mlpack/methods/cf/cf_impl.hpp Sun Aug 17 06:20:49 2014
@@ -12,6 +12,12 @@
namespace mlpack {
namespace cf {
+/**
+ * This function is used to factorize the rating matrix into the user and item
+ * matrices, when UsesCoordinateList of property of the factorizer is set to
+ * false. It uses the cleaned rating matrix instead of a (user, item, rating)
+ * list.
+ */
template<typename FactorizerType>
void ApplyFactorizer(arma::mat& data,
arma::sp_mat& cleanedData,
@@ -20,11 +26,17 @@
arma::mat& w,
arma::mat& h,
const typename boost::enable_if_c<
- FactorizerTraits<FactorizerType>::IsCleaned == false, int*>::type = 0)
+ FactorizerTraits<FactorizerType>::UsesCoordinateList == false,
+ int*>::type = 0)
{
factorizer.Apply(cleanedData, rank, w, h);
}
+/**
+ * This function is used to factorize the rating matrix into the user and item
+ * matrices, when UsesCoordinateList of property of the factorizer is set to
+ * true. It uses the (user, item, rating) list for factorization.
+ */
template<typename FactorizerType>
void ApplyFactorizer(arma::mat& data,
arma::sp_mat& cleanedData,
@@ -33,7 +45,8 @@
arma::mat& w,
arma::mat& h,
const typename boost::enable_if_c<
- FactorizerTraits<FactorizerType>::IsCleaned == true, int*>::type = 0)
+ FactorizerTraits<FactorizerType>::UsesCoordinateList == true,
+ int*>::type = 0)
{
factorizer.Apply(data, rank, w, h);
}
Modified: mlpack/trunk/src/mlpack/methods/regularized_svd/regularized_svd.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/methods/regularized_svd/regularized_svd.hpp (original)
+++ mlpack/trunk/src/mlpack/methods/regularized_svd/regularized_svd.hpp Sun Aug 17 06:20:49 2014
@@ -72,7 +72,7 @@
{
public:
//! Data provided to RegularizedSVD need not be cleaned.
- static const bool IsCleaned = true;
+ static const bool UsesCoordinateList = true;
};
}; // namespace cf
More information about the mlpack-svn
mailing list