Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styled README #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 70 additions & 79 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,130 +1,121 @@
# Movie-Recommender-Systems

This repositories contain different recommender systems applied on the famous MovieLens 20M dataset. It contains three repositories:
1. Content Based Filtering
2. Demographic Filtering
This repositories contain different recommender systems applied on the famous MovieLens 20M dataset.<br />
It contains three repositories:
1. Demographic Filtering
2. Content Based Filtering
3. Collaborative Filtering

Demographic Filtering:
In the notebook I have applied weighted IMDB rating and recalculated scores of each movie and found the top scored movies.
The results are as follows:

movie id title vote_count avg_rating genres score

1. Shawshank Redemption, The (1994) 63366 4.446990 Crime|Drama 4.438219

2. 843 Godfather, The (1972) 41355 4.364732 Crime|Drama 4.352553

3. 49 Usual Suspects, The (1995) 47006 4.334372 Crime|Mystery|Thriller 4.324027

4. 523 Schindler's List (1993) 50054 4.310175 Drama|War 4.300743
### Demographic Filtering

5. 1195 Godfather: Part II, The (1974) 27398 4.275641 Crime|Drama 4.259330
In the notebook I have applied _weighted IMDB rating_ and recalculated scores of each movie and found the top scored movies. <br />

6. 887 Rear Window (1954) 17449 4.271334 Mystery|Thriller 4.246182

7. 895 Casablanca (1942) 24349 4.258327 Drama|Romance 4.240446

8. 1935 Seven Samurai (Shichinin no samurai) (1954) 11611 4.274180 Action|Adventure|Drama 4.236870

9. 1169 One Flew Over the Cuckoo's Nest (1975) 29932 4.248079 Drama 4.233671

10. 737 Dr. Strangelove or: How I Learned to Stop Worr...23220 4.247287 Comedy|War 4.228841
The results are as follows:
Movie id | Title | Vote_Count | Avg_Rating | Genres | Score
----------|-------|------------|------------|--------|-------
69 | Shawshank Redemption, The (1994) | 63366 | 4.446990 | Crime/Drama | 4.438219
843 | Godfather, The (1972) | 41355 | 4.364732 | Crime/Drama | 4.352553
49 | Usual Suspects, The (1995) | 47006 | 4.334372 | Crime/Mystery/Thriller | 4.324027
523 | Schindler's List (1993) | 50054 | 4.310175 | Drama/War | 4.300743
1195 | Godfather: Part II, The (1974) | 27398 | 4.275641 | Crime/Drama | 4.259330
887 | Rear Window (1954) | 17449 | 4.271334 | Mystery/Thriller | 4.246182
895 | Casablanca (1942) | 24349 | 4.258327 | Drama/Romance | 4.240446
1935 | Seven Samurai (Shichinin no samurai) (1954) | 11611 | 4.274180 | Action/Adventure/Drama | 4.236870
1169 | One Flew Over the Cuckoo's Nest (1975) | 29932 | 4.248079 | Drama | 4.233671
737 | Dr. Strangelove or: How I Learned to Stop Worr... | 23220 | 4.247287 | Comedy/War | 4.228841


<br />

The top most scored movie is Shawshank Redemption, The (1994) with a nice score of 4.43
The **top** most scored movie is **Shawshank Redemption, The (1994)** with a nice _score of 4.43_

<br />

Now let us apply content based filtering to it and find similar movies to it
### Content Based Filtering

Now let us apply **Content based filtering** to **Shawshank Redemption, The (1994)** and find similar movies to it

The results for Content based filtering are:

1.Casino(1995)

2.Shanghai Triad (Yao a yao yao dao waipo qiao) ...

3.Dead Man Walking (1995)

4.Hate (Haine, La) (1995)

5.Young Poisoner's Handbook, The (1995)

6.Glass Shield, The (1994)

7.Heavenly Creatures (1994)

8.Little Odessa (1994)

9.New Jersey Drive (1995)

10.Once Were Warriors (1994)



The above systems are not personal hence any user browsing them will receive the same recommendations

Let us improvise it by using Collaborative Filtering and lets say we want to recommend user 19 movies:
1. Casino(1995)

2. Shanghai Triad (Yao a yao yao dao waipo qiao) ...

3. Dead Man Walking (1995)

Top 10 Recommendations for UserId 19:
4. Hate (Haine, La) (1995)

Independence Day (a.k.a. ID4) (1996)
5. Young Poisoner's Handbook, The (1995)

Toy Story (1995)
6. Glass Shield, The (1994)

Twister (1996)
7. Heavenly Creatures (1994)

Rock, The (1996)
8. Little Odessa (1994)

Mission: Impossible (1996)
9. New Jersey Drive (1995)

Willy Wonka & the Chocolate Factory (1971)
10. Once Were Warriors (1994)

Fargo (1996)
<br />

Mr. Holland's Opus (1995)
---

Broken Arrow (1996)
> The above systems are not personal hence any user using them will receive the same recommendations

Birdcage, The (1996)
---

### Collaborative Filtering
Let us improvise it by using **Collaborative Filtering**. Lets say we want to recommend the user-19 some movies:


These are generated by our model and now lets compare the movies which user 19 rated the best
<br />
Top 10 Recommendations for UserId 19 are:

1. Independence Day (a.k.a. ID4) (1996)

2. Toy Story (1995)

Rating title genres
3. Twister (1996)

5.0 Birdcage, The (1996) Comedy
4. Rock, The (1996)

5.0 Fargo (1996) Comedy|Crime|Drama|Thriller
5. Mission: Impossible (1996)

5.0 Sabrina (1995) Comedy|Romance
6. Willy Wonka & the Chocolate Factory (1971)

5.0 Eddie (1996) Comedy
7. Fargo (1996)

5.0 Celtic Pride (1996) Comedy
8. Mr. Holland's Opus (1995)

5.0 White Squall (1996) Action|Adventure|Drama
9. Broken Arrow (1996)

5.0 Rumble in the Bronx (Hont faan kui) (1995) Action|Adventure|Comedy|Crime
10. Birdcage, The (1996)

5.0 Heat (1995) Action|Crime|Thriller

5.0 Toy Story (1995) Adventure|Animation|Children|Comedy|Fantasy
These are generated by our model and now lets compare these with the movies which user-19 rated the best

5.0 Mr. Holland's Opus (1995) Drama
<br />

Rating | Title | Genres
-------|-------|--------
5.0 | Birdcage, The (1996) | Comedy
5.0 | Fargo (1996) | Comedy/Crime/Drama/Thriller
5.0 | Sabrina (1995) | Comedy/Romance
5.0 | Eddie (1996) | Comedy
5.0 | Celtic Pride (1996) | Comedy
5.0 | White Squall (1996) | Action/Adventure/Drama
5.0 | Rumble in the Bronx (Hont faan kui) (1995) | Action/Adventure/Comedy/Crime
5.0 | Heat (1995) | Action/Crime/Thriller
5.0 | Toy Story (1995) | Adventure|Animation|Children|Comedy|Fantasy
5.0 | Mr. Holland's Opus (1995) | Drama


<br />


Do not worry if predicted top movies are not same as users top recommendations. Here, we completed the utility matrix and predicted which movies got highest rating. Based on particular user if the user has rated other movies which he did not rate previously, we now understand the user and estimated ratings he will give to new ones. May be some new movies which the user did not rate has got good ratings, hence we recommend those.
Do not worry if the predicted top movies are not same as the user's top recommendations. Here, we completed the utility matrix and predicted which movies have got the highest rating. Based on a particular user, if the user has rated other movies which he did not rate previously, then we understand the user and estimate the ratings he will give to new ones. May be some new movies which the user did not rate has got good ratings, hence we recommend those.

Hence this system performs good at personalizing user preferences and understand him.
**Hence this system performs good at personalizing recommendations and understanding the user better.**

Kudos, finally we are able to create a personalized system for users in our dataset.
``` Kudos, finally we are able to create a personalized system for users in our dataset. ```