For more information see the mailing list archive (KnnItemBasedRecommender question)
Integrated in Mahout-Quality #1211 (See https://builds.apache.org/job/Mahout-Quality/1211/)
MAHOUT-901 probable fixes to the knn recommender
srowen : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1207820
Thanks, though this is identical to the current test (modulo fixing the names). It still passes, so that is good.
Added a JUnit test based on the original JUnit test.
Unfortunately I do not have the time to build a dataset, where to show that both algorithms deliver different results.
Thanks, I've committed, with minor style and formatting changes. This does seem to work significantly better than the original version so I don't doubt you have actually fixed something here.
About the exception line, a user is removed if he doesn't rated an item. Of course the size1 (size of the array) can be adjusted every time when a user is removed, but it works with the exception to. If you want you can subtract 1 from size1 every time a user is removed from the array instead of trowing an exception.
Sounds good, I generally trust you've investigated this and tested it – any chance you have a unit test that just shows it outputs what you expect on a tiny data set? You can copy and paste others.
The code needs some formatting changes but I can do that. THe only line I question is the "catch (Exception)" bit – should this not be replaced with bounds checking?
Updated calculation of Â matrix and b^ vector.