9.7 Giving recommendations

Finally, we will use the “popular” method to provide recommendations. We will show top 5 movies to the first 4 users.

recos_pop <- pop %>% 
  predict(known_movies, n = 5)
as(recos_pop, "list") %>%
  head(4)
## $`2`
## [1] "Star Wars (1977)"                 "Raiders of the Lost Ark (1981)"  
## [3] "Fargo (1996)"                     "Silence of the Lambs, The (1991)"
## [5] "Schindler's List (1993)"         
## 
## $`27`
## [1] "Raiders of the Lost Ark (1981)"   "Godfather, The (1972)"           
## [3] "Silence of the Lambs, The (1991)" "Schindler's List (1993)"         
## [5] "Shawshank Redemption, The (1994)"
## 
## $`63`
## [1] "Star Wars (1977)"                 "Raiders of the Lost Ark (1981)"  
## [3] "Godfather, The (1972)"            "Fargo (1996)"                    
## [5] "Silence of the Lambs, The (1991)"
## 
## $`73`
## [1] "Star Wars (1977)"                 "Raiders of the Lost Ark (1981)"  
## [3] "Godfather, The (1972)"            "Fargo (1996)"                    
## [5] "Silence of the Lambs, The (1991)"

As expected, popular recommendations are the same for all the users.

Let’s also see the recommendations based on Funk SVD.

recos_svdf <- svdf %>% 
  predict(known_movies, n = 5)
as(recos_svdf, "list") %>%
  head(4)
## $`16`
## [1] "Star Wars (1977)"                 "Shawshank Redemption, The (1994)"
## [3] "Empire Strikes Back, The (1980)"  "Godfather, The (1972)"           
## [5] "Good Will Hunting (1997)"        
## 
## $`26`
## [1] "Titanic (1997)"                  "Empire Strikes Back, The (1980)"
## [3] "Star Wars (1977)"                "Raiders of the Lost Ark (1981)" 
## [5] "Braveheart (1995)"              
## 
## $`44`
## [1] "Pretty Woman (1990)"            "Forrest Gump (1994)"           
## [3] "American President, The (1995)" "Field of Dreams (1989)"        
## [5] "Independence Day (ID4) (1996)" 
## 
## $`53`
## [1] "Schindler's List (1993)"          "Casablanca (1942)"               
## [3] "Shawshank Redemption, The (1994)" "It's a Wonderful Life (1946)"    
## [5] "Wrong Trousers, The (1993)"

Funk SVD suggests different movies to different users.