Mahout
  1. Mahout
  2. MAHOUT-901

KnnItemBasedRecommender is not working properly

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.5
    • Fix Version/s: 0.6
    • Labels:

      Description

      For more information see the mailing list archive (KnnItemBasedRecommender question)

        Activity

        Hide
        Georgi Stanev added a comment -

        Updated calculation of  matrix and b^ vector.

        Show
        Georgi Stanev added a comment - Updated calculation of  matrix and b^ vector.
        Hide
        Sean Owen added a comment -

        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?

        Show
        Sean Owen added a comment - 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?
        Hide
        Georgi Stanev added a comment -

        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.

        Show
        Georgi Stanev added a comment - 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.
        Hide
        Sean Owen added a comment -

        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.

        Show
        Sean Owen added a comment - 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.
        Hide
        Georgi Stanev added a comment - - edited

        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.

        Show
        Georgi Stanev added a comment - - edited 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.
        Hide
        Sean Owen added a comment -

        Thanks, though this is identical to the current test (modulo fixing the names). It still passes, so that is good.

        Show
        Sean Owen added a comment - Thanks, though this is identical to the current test (modulo fixing the names). It still passes, so that is good.
        Hide
        Hudson added a comment -

        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
        Files :

        • /mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/knn/KnnItemBasedRecommender.java
        Show
        Hudson added a comment - 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 Files : /mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/knn/KnnItemBasedRecommender.java

          People

          • Assignee:
            Sean Owen
            Reporter:
            Georgi Stanev
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development