Giter Club home page Giter Club logo

dheeraj9599 / movie-recommender-system Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 0.0 26.9 MB

I made a Movie recommendation Engine using Content Based Filtering, Collaborative filtering. In content Based Filtering I done Preprocessing of data, used Average-weighted-rating technique, Statistical Approach, Vectorization, Cosine Similarity. While in Collaborative I done some Preprocessing of data, Make Pivot table, Vectorization, Correlation Scores, SVD and KNN Algorithms.

Jupyter Notebook 99.67% Python 0.30% CSS 0.03%
collaborative-filtering movie-recommendation movie-recommender python recommendation-system recommender-system

movie-recommender-system's Introduction

Web app Link - https://movie-recommender-engine-dk321.herokuapp.com/

NOTE :

  1. Run The Collaborative_Filtering(SVD and KNN) ipynb file on google collab only.
  2. web.py is the Web app - To run it use New_data.pkl and matrix.pkl data
  3. Necessary libraries needed for running web.py : requests==2.27.1 streamlit==1.9.1 streamlit_lottie==0.0.3

Movie-Recommendation-Engine

I made 3 Types of Recommendation Engine

1.Simple Recommemder System Model :

In this model I used TMDB 5000 Movie dataset : https://www.kaggle.com/datasets/tmdb/tmdb-movie-metadata which contains movies.csv and credits.csv.

IMPORTANT LIBRARIES USED :

for data analysis: import matplotlib.pyplot as plt import seaborn as sns

for scaledown the values: from sklearn.preprocessing import MinMaxScaler from scipy import stats

In this Model I used Weighted average rating and some statistical approach to recommend movies on the basis of Weight average ratings whose formula is given by

Average_weighted_Technique

From this technique we are going to calculate the average weighted rating whose formula is given by : W = (Rv + Cm)/โ€‚v + m R is the average rating of the movie C is the mean of votes w.r.t all the movies v is the number of votes w.r.t each movie(vote_count) m is the minimum votes required to be in a list Top movies

Using the average_weighted_technique I sorted the movies and give recommendations. Then I used both weighted_average_rating and popularity score giving 50%-50% priority to both and recommend popular high rated movies. then I pickle the

2. Content-Based-Recommendation-engine :

In this model I Used the same dataset by pickling dataset from 1st recommender System model as we need average weighted ratings in furthure process.

IMPORTANT LIBRARIES REQUIRED:

for vectorization and Cosine Distance or similarity

from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer

from sklearn.metrics.pairwise import linear_kernel, cosine_similarity

for stemming the words

from nltk.stem.snowball import SnowballStemmer

from nltk.stem.wordnet import WordNetLemmatizer

from nltk.corpus import wordnet

Approaches used :

              1. Preprocessing of data(duplicates, missing values, unnecessary columns, merging, modifying)

              2. Vectorization
              
              3. Cosine similarity
              
              4. Optimizing using weighted average ratings

In this model I first do preprocessing of dataset like finding duplicates, missing values and dropping the unnecessary columns, after that i cleaned the required columns for checking similarities between genres, cast, crew, keywords as it is a content based system. then I merged all this columns to make a final details columns and then convert it into the vectors of strings and then check the similarity scores between each movie and recommend movies with high similarity.

3. Collaborative-filtering-based-Recommender Engine :

In this model I used movie_lens.csv dataset as it contains users with ratings. In this model I filtered the movies on the basis of no. of user ratings and minnimu no. of ratings required(threshold rating).

Datasets :- https://raw.githubusercontent.com/susanli2016/Machine-Learning-with-Python/master/movielens_data/ratings.csv https://raw.githubusercontent.com/susanli2016/Machine-Learning-with-Python/master/movielens_data/movies.csv

Approches used :

             1. Statistical Filtering
             
             2. Pivot Table
             
             3. Correlation
             
             4.KNN algorithm 

4. User Based, Item Based Based Recommender Engine using KNN, SVD algorithm.

Datasets :- https://raw.githubusercontent.com/susanli2016/Machine-Learning-with-Python/master/movielens_data/ratings.csv https://raw.githubusercontent.com/susanli2016/Machine-Learning-with-Python/master/movielens_data/movies.csv

NOTE : Run The Collaborative_Filtering(SVD and KNN) ipynb file on google collab.

Web App Images:

Screenshot (282)

Screenshot (284)

Screenshot (287)

Screenshot (288)

movie-recommender-system's People

Contributors

dheeraj9599 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.