item_recommendation.Rd
Use the user item matrix to search for similar anime
item_recommendation( selected_item_name, user_item_matrix, n_recommendation, data )
selected_item_name | selection of the user in the Shiny App |
---|---|
user_item_matrix | matrix created by the function `user_item_matrix` |
n_recommendation | number of recommendation wanted by the user |
data | table of all anime |
Return a table composed of `n_recommendation` that the user have not seen yet
Marie Bellier, Massimo Finini, Meri Likoska, Vania Rodrigues Telo Ramos, Xavier Renger
#Simple example to showcase what is happening in the application #User selection selected_item_name = "Naruto" #first create the item matrix anime <- tibble::tibble(ProjectG5::anime) anime_with_ratings <- tibble::tibble(ProjectG5::anime_with_ratings) item_matrix <- user_item_matrix(anime_with_ratings, adding_row = FALSE) #then use it to run the function item_recommendation(selected_item_name, item_matrix, 5, anime) #> # A tibble: 5 x 5 #> item_id Name Episodes Duration similarity #> <chr> <chr> <chr> <int> <dbl> #> 1 ID1735 Naruto:Shippuden 500 23 0.911 #> 2 ID269 Bleach 366 24 0.876 #> 3 ID1535 Death Note 37 23 0.862 #> 4 ID16498 Attack on Titan 25 24 0.848 #> 5 ID11757 Sword Art Online 25 23 0.843