April 2017
Intermediate to advanced
532 pages
12h 39m
English
Starting Spark v2.0, org.apache.spark.ml.recommendation.ALS modeling is a blocked implementation of the factorization algorithm that groups "users" and "products" factors into blocks and decreases communication by sending only one copy of each user vector to each product block at each iteration, and only for the product blocks that need that user's feature vector.
Here, we will load the rating data from the movies dataset where each row consists of a user, movie, rating, and a timestamp. We will then train an ALS model by default works on explicit preferences (implicitPrefs is false). We will evaluate the recommendation model by measuring the root-mean-square error of rating prediction as follows:
object ALSModeling ...
Read now
Unlock full access