-
- Downloads
SPARK-2768 [MLLIB] Add product, user recommend method to MatrixFactorizationModel
Right now, `MatrixFactorizationModel` can only predict a score for one or more `(user,product)` tuples. As a comment in the file notes, it would be more useful to expose a recommend method, that computes top N scoring products for a user (or vice versa – users for a product). (This also corrects some long lines in the Java ALS test suite.) As you can see, it's a little messy to access the class from Java. Should there be a Java-friendly wrapper for it? with a pointer about where that should go, I could add that. Author: Sean Owen <srowen@gmail.com> Closes #1687 from srowen/SPARK-2768 and squashes the following commits: b349675 [Sean Owen] Additional review changes c9edb04 [Sean Owen] Updates from code review 7bc35f9 [Sean Owen] Add recommend methods to MatrixFactorizationModel
Showing
- mllib/src/main/scala/org/apache/spark/mllib/recommendation/MatrixFactorizationModel.scala 42 additions, 2 deletions...spark/mllib/recommendation/MatrixFactorizationModel.scala
- mllib/src/test/java/org/apache/spark/mllib/recommendation/JavaALSSuite.java 58 additions, 17 deletions...a/org/apache/spark/mllib/recommendation/JavaALSSuite.java
Please register or sign in to comment