[mlpack-svn] r16282 - mlpack/trunk/src/mlpack/methods/cf
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Feb 11 12:11:44 EST 2014
Author: rcurtin
Date: Tue Feb 11 12:11:44 2014
New Revision: 16282
Log:
Fix from Siddharth, fixes #324.
Modified:
mlpack/trunk/src/mlpack/methods/cf/cf.cpp
mlpack/trunk/src/mlpack/methods/cf/cf.hpp
mlpack/trunk/src/mlpack/methods/cf/cf_main.cpp
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 Tue Feb 11 12:11:44 2014
@@ -170,8 +170,7 @@
insertPosition--;
}
- // Now insert it into the list, but insert item (j + 1), not item j,
- // because everything is offset.
+ // Now insert it into the list.
InsertNeighbor(i, insertPosition, j, value, recommendations,
values);
}
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 Feb 11 12:11:44 2014
@@ -49,6 +49,7 @@
* should have three rows. The first represents the user; the second represents
* the item; and the third represents the rating. The user and item, while they
* are in a matrix that holds doubles, should hold integer (or size_t) values.
+ * The user and item indices are assumed to be starting from 0.
*/
class CF
{
Modified: mlpack/trunk/src/mlpack/methods/cf/cf_main.cpp
==============================================================================
--- mlpack/trunk/src/mlpack/methods/cf/cf_main.cpp (original)
+++ mlpack/trunk/src/mlpack/methods/cf/cf_main.cpp Tue Feb 11 12:11:44 2014
@@ -28,7 +28,8 @@
"The input file should contain a 3-column matrix of ratings, where the "
"first column is the user, the second column is the item, and the third "
"column is that user's rating of that item. Both the users and items "
- "should be numeric indices, not names.");
+ "should be numeric indices, not names. The indices are assumed to start "
+ "from 0.");
// Parameters for program.
PARAM_STRING_REQ("input_file", "Input dataset to perform CF on.", "i");
More information about the mlpack-svn
mailing list