July 2018
Beginner to intermediate
146 pages
3h 39m
English
In the plot description-based recommender, we worked with a single overview feature, which was a body of text. Therefore, we were able to apply our vectorizer directly.
However, this is not the case with our metadata-based recommender. We have four features to work with, of which three are lists and one is a string. What we need to do is create a soup that contains the actors, director, keywords, and genres. This way, we can feed this soup into our vectorizer and perform similar follow-up steps to before:
#Function that creates a soup out of the desired metadatadef create_soup(x): return ' '.join(x['keywords']) + ' ' + ' '.join(x['cast']) + ' ' + x['director'] + ' ' + ' '.join(x['genres'])
With this function in ...
Read now
Unlock full access