Skip to content

Pawan300/Movie-Recommendation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recommendation-System-based-on-Nonnegative-Matrix-Factorization

Goal:

To recommend the movies that user might want to watch.

Recommender systems

netflix

  • Recommender systems aim to predict user’s interests and recommend product items that quite likely are interesting for them. They are among the most powerful machine learning systems that online retailers implement in order to drive sales.
  • Data required for recommender systems stems from explicit user ratings after watching a movie or listening to a song, from implicit search engine queries and purchase histories, or from other knowledge about the users/items themselves.

    Examples of Recommendation systems are Netflix or YouTube that suggest playlists or make video recommendations

Types of recommender systems:

  • Content-based systems, which use characteristic information.

  • Collaborative filtering systems, which are based on user-item interactions.

  • Hybrid systems, which combine both types of information with the aim of avoiding problems that are generated when working with just one kind.

Dataset :

Movie lens Dataset consists of (link):

  • 100000 ratings (~ 1 lakh)
  • 600 users

Some Analysis :

Information about the data :


Number of Users : 610
Number of movies : 9742


Movies with highest number of user ratings :

Age of Innocence, The (1993)
I Love Trouble (1994)
Virtuosity (1995)
Cemetery Man (Dellamorte Dellamore) (1994)
Teenage Mutant Ninja Turtles II: The Secret of the Ooze (1991)


User who gave more ratings :

UserId Movie ID
414 2698
599 2478
474 2108
448 1864
274 1346

Matrix factorization

netflix

Where,

  • R (users,movies)
  • U (users,d)
  • VT (d,movies) Here, d is the number of latent features.

Cost Function

netflix

netflix

Prediction of rating of movies using gradient descent algorithm.

Gradient descent

Gradient descent is a first-order iterative optimization algorithm for finding a local minimum of a differentiable function. To find a local minimum of a function using gradient descent, we take steps proportional to the negative of the gradient (or approximate gradient) of the function at the current point.

Optimization techniques used in Gradient descent

  • Regularized Gradient descent

netflix

  • Sliding Window Gradient descent

netflix

  • Line Search Gradient descent

netflix

  • Particle Swarm Optimization(PSO) Gradient descent

Results :

Root Mean Square Error (RMSE)

Optimization Epochs Train error Test error
Gradient Descent (MMF) 10000 1.09 1.14
Regularised (MMF) 1000 1.43 1.46

It's time to recommend :

For User Id : 2

Movie ID Movie
26776 Porco Rosso (Crimson Pig) (Kurenai no buta) (1992)
104879 Prisoners (2013)
5358 Mountains of the Moon (1990)
175569 Wind River (2017)
626 Thin Line Between Love and Hate, A (1996)