Step 7 - Making predictions

Let's get the top six movie predictions for user 668. The following source code can be used to make the predictions:

// Making Predictions. Get the top 6 movie predictions for user 668 
println("Rating:(UserID, MovieID, Rating)") println("----------------------------------")
val topRecsForUser = model.recommendProducts(668, 6) for (rating <- topRecsForUser) { println(rating.toString()) } println("----------------------------------")
>>>
Figure 7: Top six movie predictions for user 668
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset