Rank for the features in this model.
RDD of tuples where each tuple represents the userId and the features computed for this user.
RDD of tuples where each tuple represents the productId and the features computed for this product.
Current version of model save/load format.
Current version of model save/load format.
Java-friendly version of MatrixFactorizationModel.predict.
Predict the rating of many users for many products.
Predict the rating of many users for many products. The output RDD has an element per each element in the input RDD (including all duplicates) unless a user or product is missing in the training set.
RDD of (user, product) pairs.
RDD of Ratings.
Predict the rating of one user for one product.
RDD of tuples where each tuple represents the productId and the features computed for this product.
Rank for the features in this model.
Recommends products to a user.
Recommends products to a user.
the user to recommend products to
how many products to return. The number returned may be less than this.
Rating objects, each of which contains the given user ID, a product ID, and a "score" in the rating field. Each represents one recommended product, and they are sorted by score, decreasing. The first returned is the one predicted to be most strongly recommended to the user. The score is an opaque value that indicates how strongly recommended the product is.
Recommends topK products for all users.
Recommends topK products for all users.
how many products to return for every user.
[(Int, Array[Rating])] objects, where every tuple contains a userID and an array of rating objects which contains the same userId, recommended productID and a "score" in the rating field. Semantics of score is same as recommendProducts API
Recommends users to a product.
Recommends users to a product. That is, this returns users who are most likely to be interested in a product.
the product to recommend users to
how many users to return. The number returned may be less than this.
Rating objects, each of which contains a user ID, the given product ID, and a "score" in the rating field. Each represents one recommended user, and they are sorted by score, decreasing. The first returned is the one predicted to be most strongly recommended to the product. The score is an opaque value that indicates how strongly recommended the user is.
Recommends topK users for all products.
Recommends topK users for all products.
how many users to return for every product.
[(Int, Array[Rating])] objects, where every tuple contains a productID and an array of rating objects which contains the recommended userId, same productID and a "score" in the rating field. Semantics of score is same as recommendUsers API
Save this model to the given path.
Save this model to the given path.
This saves:
The model may be loaded using Loader.load.
Spark context used to save model data.
Path specifying the directory in which to save this model. If the directory already exists, this method throws an exception.
RDD of tuples where each tuple represents the userId and the features computed for this user.
Model representing the result of matrix factorization.
Note: If you create the model directly using constructor, please be aware that fast prediction requires cached user/product features and their associated partitioners.