[mlpack] 01/22: Add rank parameter. This might not be applicable to when we have other decompositions, though.
Barak A. Pearlmutter
barak+git at cs.nuim.ie
Thu Apr 17 12:23:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch svn-trunk
in repository mlpack.
commit 52b48ed0904d1ba87c4ffa70fadda77f675d06c6
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date: Mon Apr 14 18:20:22 2014 +0000
Add rank parameter. This might not be applicable to when we have other
decompositions, though.
git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16421 9d5b8971-822b-0410-80eb-d18c1038ef23
---
src/mlpack/methods/cf/cf_main.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mlpack/methods/cf/cf_main.cpp b/src/mlpack/methods/cf/cf_main.cpp
index 7914573..7c873d4 100644
--- a/src/mlpack/methods/cf/cf_main.cpp
+++ b/src/mlpack/methods/cf/cf_main.cpp
@@ -51,6 +51,8 @@ PARAM_INT("recommendations", "Number of recommendations to generate for each "
PARAM_INT("neighborhood", "Size of the neighborhood of similar users to "
"consider for each query user.", "n", 5);
+PARAM_INT("rank", "Rank of decomposed matrices.", "R", 2);
+
int main(int argc, char** argv)
{
// Parse command line options.
@@ -67,11 +69,13 @@ int main(int argc, char** argv)
// Get parameters.
const size_t numRecs = (size_t) CLI::GetParam<int>("recommendations");
const size_t neighborhood = (size_t) CLI::GetParam<int>("neighborhood");
+ const size_t rank = (size_t) CLI::GetParam<int>("rank");
// Perform decomposition to prepare for recommendations.
Log::Info << "Performing CF matrix decomposition on dataset..." << endl;
CF<> c(dataset);
c.NumUsersForSimilarity(neighborhood);
+ c.Rank(rank);
// Reading users.
const string queryFile = CLI::GetParam<string>("query_file");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list