One popular technique of recommendation/recommender systems is content-based filtering. Content here refers to the content or attributes of the products you like. So, the idea in content-based filtering is to tag products using certain keywords, understand what the user likes, look up those keywords in the database and recommend different products with the same attributes.
Now let’s take an example of recommending the movie based on content filtering.
Assume a person watches a movie A(Avengers) and there exists a sequel to it.It is highly likely that he is going to watch the sequel of movie A(say B(Age of Ultron)). So based on the description of the movie there would be certain keywords(say galaxy,Nick,iron-man) related to the movie A which will map to movie B.Using TF-IDF model we can make a weighted matrix of several keywords and using this matrix we can use cosine-similarity / Pearson-coefficient.
Let us suppose A = (1,2,3) Keywords Weighted where 1 is the weight of galaxy
& our movie B = (1,2,4) galaxy,Nick keyword is same in A & B
which will be close to 1 keeping above values
Head over to my notebook to view in detail analysis of above given maths along with code.