Login | Registration | Recommendations |
---|---|---|
credit - https://github.com/sujithkanna/SmileyRating
order to build the recommendation engine, I will basically proceed in two steps:
- 1/ determine
$N$ films with a content similar to the entry provided by the user - 2/ select the 5 most popular films among these
$N$ films
When builing the engine, the first step thus consists in defining a criteria that would tell us how close two films are. To do so, I start from the description of the film that was selected by the user: from it, I get the director name, the names of the actors and a few keywords. I then build a matrix where each row corresponds to a film of the database and where the columns correspond to the previous quantities (director + actors + keywords) plus the k genres.
In this matrix, the
d(m,n) = sqrt( sum( a(m,i) - a(n,i) ) )
At this stage, we just have to select the N films which are the closest from the entry selected by the user.
According to similarities between entries, we get a list of
- the IMDB score
- the number of votes the entry received
- the year of release
The two first criteria will be a direct measure of the popularity of the various entries in IMDB. For the third criterium, I introduce the release year since the database spans films from the early
Then, I calculate the score according to the formula: score = IMDB^2 * gaussian kernel(vote_count) * gaussian kernel(year of release)
gaussian function:
exp( - (x - mean)/(2*correlaton cofficient))
USE find_similarities(dataframe , index of movie , del_sequels = True, verbose = True) FUNCTION TO GET YOUR RECOMMENDATIONS.