[mlpack-svn] r15883 - mlpack/trunk/src/mlpack/methods/cf
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Mon Sep 30 22:24:41 EDT 2013
Author: rcurtin
Date: Mon Sep 30 22:24:40 2013
New Revision: 15883
Log:
Remove CalculateTopRecommendations() function, because it was only called once.
The 'recos' variable, as best I could tell, was not used for anything.
Modified:
mlpack/trunk/src/mlpack/methods/cf/cf.cpp
mlpack/trunk/src/mlpack/methods/cf/cf.hpp
Modified: mlpack/trunk/src/mlpack/methods/cf/cf.cpp
==============================================================================
--- mlpack/trunk/src/mlpack/methods/cf/cf.cpp (original)
+++ mlpack/trunk/src/mlpack/methods/cf/cf.cpp Mon Sep 30 22:24:40 2013
@@ -194,19 +194,6 @@
averages.col(i) /= neighborhood.n_rows;
}
- // Calculate the top recommendations.
- CalculateTopRecommendations(recommendations, averages, users);
-}
-
-void CF::CalculateTopRecommendations(arma::Mat<size_t>& recommendations,
- arma::mat& averages,
- arma::Col<size_t>& users) const
-{
- Log::Info<<"CalculateTopRecommendations"<<endl;
- int recos = numRecs;
- if(averages.n_cols<numRecs)
- recos = averages.n_rows;
-
// Generate recommendations for each query user by finding the maximum numRecs
// elements in the averages matrix.
recommendations.set_size(numRecs, users.n_elem);
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 Mon Sep 30 22:24:40 2013
@@ -204,17 +204,6 @@
void Query(arma::Mat<size_t>& recommendations,arma::Col<size_t>& users);
/**
- * Calculates the top recommendations given average rating
- * for each user.
- *
- * @param neighbourhood Matrix to store user neighbourhood.
- * @param averages stores the average rating for each item.
- */
- void CalculateTopRecommendations(arma::Mat<size_t>& recommendations,
- arma::mat& averages,
- arma::Col<size_t>& users) const;
-
- /**
* Helper function to insert a point into the recommendation matrices.
*
* @param queryIndex Index of point whose recommendations we are inserting
More information about the mlpack-svn
mailing list