[mlpack-svn] r15888 - mlpack/trunk/src/mlpack/methods/cf

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Oct 1 11:58:51 EDT 2013


Author: rcurtin
Date: Tue Oct  1 11:58:50 2013
New Revision: 15888

Log:
Remove method that allows modifying the data matrix, because references can't be
re-pointed, and also because the sparse data matrix is only built in the
constructor.


Modified:
   mlpack/trunk/src/mlpack/methods/cf/cf.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	Tue Oct  1 11:58:50 2013
@@ -93,18 +93,6 @@
     this->numRecs = recs;
   }
 
-  //! Sets data
-  void Data(arma::mat& d)
-  {
-    data = d;
-  }
-
-  //! Gets data
-  arma::mat Data()
-  {
-    return data;
-  }
-
   //! Gets numRecs
   size_t NumRecs()
   {
@@ -135,6 +123,8 @@
   const arma::mat& H() const { return h; }
   //! Get the Rating Matrix.
   const arma::mat& Rating() const { return rating; }
+  //! Get the data matrix.
+  const arma::mat& Data() const { return data; }
 
   /**
    * Generates default number of recommendations for all users.
@@ -176,21 +166,21 @@
                           size_t neighbours);
 
  private:
-  //! Number of Recommendations.
+  //! Number of recommendations.
   size_t numRecs;
-  //! Number of User for Similariy.
+  //! Number of users for similarity.
   size_t numUsersForSimilarity;
-  //! User Matrix.
+  //! User matrix.
   arma::mat w;
-  //! Item Matrix.
+  //! Item matrix.
   arma::mat h;
-  //! Rating Martix.
+  //! Rating matrix.
   arma::mat rating;
-  //! Initial Data Matrix.
+  //! Initial data matrix.
   arma::mat data;
-  //! Cleaned Data Matrix.
+  //! Cleaned data matrix.
   arma::sp_mat cleanedData;
-  //!Converts the User, Item, Value Matrix to User-Item Table
+  //! Converts the User, Item, Value Matrix to User-Item Table
   void CleanData();
 
   /**



More information about the mlpack-svn mailing list