ASIAN COLLEGE OF HIGHER STUDIES

ASIAN COLLEGE OF HIGHER STUDIES (ACHS)
Tribhuvan University
Institute of Science and Technology
208407013525500
A PROJECT REPORT
ON
Movie Recommender System
Submitted to
Institute of Science and Technology
Department of Computer Science and Information Technology
Tribhuvan University
In Partial Fulfillment of the Requirement for the
Bachelor Degree in Computer Science and Information Technology
5402/Dipendra Shahi
5428/Sita Neupane
5405/Manoj Shrestha
September 3
ASIAN COLLEGE OF HIGHER STUDIES (ACHS)
Tribhuvan University
Institute of Science and Technology
SUPERVISOR’S RECOMMENDATION
I hereby recommend that this project prepared under my supervision by Dipendra Shahi Registration no., Sita Neupane Registration no., Manoj Shrestha Registration no. entitled “Movie Recommendation System With Collaborative Filtering Technique” in partial fulfillment of this requirement for the degree of B. Sc. In Computer Science and Information Technology (B. Sc. CSIT) be processed for evaluation.

……………………………
Rupesh Pradhan,
Supervisor
Acknowledgement
First of all we would like to thank to the CSIT department of “Asian College of Higher Studies” for providing such an opportunity to make this project. We would like to express our deep gratitude to our supervisor, Rupesh Pradhan for his encouragement, inspiration and support for accomplishing this project.

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

We would like to acknowledge the contributions of Mr. Sabindra Maharjan, the CEO and Mr. Brihat Boshwa, the coordinator of ACHS College for their kind cooperation during the organizational visit. Their precious time and the necessary information were really informative and helpful to us.

For the completion of this report, it was difficult to do but the support and help of the senior brothers and the respected teachers was really grateful. We would like to thank our friends and teachers and seniors of Asian College of Higher Studies College who directly and indirectly helped us for the completion of this report.

Dipendra Shahi: 5402/071
Sita Neupane: 5430/071
Manoj Shrestha: 5405/071
ABSTRACT
A movie recommendation is important in our social life due to its strength in providing enhanced entertainment. Such a system can suggest a set of movies to users based on their interest, or the popularities of the movies. While, a set of movie recommendation systems have been proposed, most of these either cannot recommend a movie to the current users efficiently or to a fresh user by any means. In this report, we propose a movie recommendation system that has the ability to recommend movies to a new user as well as the others. It mines movie databases to assemble all the important information, such as, popularity and attractiveness, required for recommendation. It creates movie clouds not only convenient for movie producer to plan a new movie but also useful for movie recommendation. In this project, we implement an information filtering technique called as Collaborative Filtering for generating personalized recommendations in movies for user. Cosine Similarity techniques is used in order to find the similarity between users and to generate recommendations to the users.

Table of Contents
Acknowledgement4
Abstract5
List of figures7
List of tables8
Chapter 1: Introduction9
1.1 Introduction9
1.2 Problem Statement 9
1.3 Objectives10
1.4 Scope and Limitation10
Chapter 2: Requirement Analysis and Feasibility Analysis11
2.1 Literature Review11
2.2 Requirement Analysis12
2.2.1 Functional Requiremen13
2.2.2 Non- Functional Requirement15
2.3 Feasibility Analysis16
2.3.1 Economical Feasibility16
2.3.2 Operational Feasibility16
2.3.3 Technical Feasibility16
2.3.4 Schedule Feasibility16
2.4 Structuring System Requirement 17
2.4.1 Data Modeling18
2.4.1.1 ER diagram18
2.4.1.2 Class diagram19
2.4.2 Process Modeling 20
2.4.2.1 Activity Diagram20
2.4.2.2 Sequence Diagram21
Chapter 3: System Design22
3.1 Interface Detail Design 23
3.2Process Modeling23
3.3.1 Flowchart 23
Chapter 4: Implementation; Testing24
4.1 Implementation24
4.1.1 Implementation tools25
4.1.2 System Testing26
4.1.2.1 Test Cases27
Chapter 5: Maintenance and Support28
Chapter 6: Conclusion29
6.1 Conclusion 29
6.2 Future works29
Reference30
Appendix32
-Source Code33
-System Screenshot56
List of Figures
Figure1: Use Case Diagram
Figure2: Grant Chart
Figure3: ER Diagram
Figure4: Class Diagram
Figure 5: Activity Diagram
Figure6: Sequence Diagram
Figure 7: Block diagram of Movie Recommender System
Figure8: SDLC for Movie Recommender System
Figure 9: Flowchart
List of Tables
Table 1: Schedule Table
Table 2: Test Case Table
Table 3: Developer Software Requirement Table
Table 4: Client-Side Software Requirement Table
Table 5: Server-Side Software Requirement
Chapter 1: Introduction
1.1 Introduction
In these modern days, Internet has become most important part of human life but also users face the problem of too much choices and options. With the so many movies at hand, people face the dilemma and confuse of what to watch. People watch something that matches with their interest, mood, taste and style. This is where Recommendation Systems can help them for suggesting and recommending movies that match user taste and viewing habits. Thus, recommended imitate social process to enable quick refining of the information on the internet. These systems are also able to collect information about users’ choices and can use this information to progress their suggestions in the future.

Thus, Movie Recommender System helps people to find the movies of their choices based on the movie experience of other users in efficient and effective way without killing time in useless browsing. Hence, for a system to understand a movie, it needs movie structures such as movie cast, movie genre, movie category etc.

1.2 Problem Statement
Sometimes, we cannot find and search the movies as per as our needs. We face so many dilemmas and confused on what to watch and confuse on how to search on our required movies. The question is:
Is it possible to extract or produce features of movie from user reviews?
Is it possible to procedure extracted features to find other similar movies?
What is good feature and how can we discriminate good features from bad ones?
Given a set of users with their earlier ratings for different movies, can we guess the rating they will assign to a movie that they have not earlier rated?
So, Movie Recommendation System aims to recommend movies to users based on user-movie ratings and their interest. This system will provide more exact results as compared to the present systems. This system analyses the similarities among the different users and then recommended movie to them according to the ratings given by the different users of related tastes.

1.3 Objectives
The main objectives of this movie recommended system are:
Extract movies features from user Ratings of movies.

Examine extracted features to find similar movies.

Draw conclusions about the performance of the developed system.

Recommend the movies based on the user preference and interest.

1.4 Scope and Limitation
Scope
It helps to reduce the problem of information burden which is a very common phenomenon with information retrieval systems and allows users to have access to services which are not easily available to users on the system. We came up with a policy that focuses on dealing with user’s personal interests and based on his earlier rating, movies are recommended to users. This strategy helps in improving correctness of the recommendations.

A personal profile is created for each user, where each user has access to his history, ratings, password modification processes. It also helps users in collecting authentic data along with improved accuracy and makes the system more responsive.
Limitation
1. Lack of Data:
Since, the biggest problem facing recommender systems is that we need a lot of data to effectively make recommendations. The more information and user data a recommender system has to work with, the stronger the probabilities of getting good recommendations. To get good recommendations, we should need a lot of users. So, we must get a lot of data for the recommendations.

2. Changing User Preference:
The problem here is that while today I have one intention or interest now and when browsing tomorrow I might have a different intention or interest.
Chapter 2: Requirement Analysis and Feasibility Analysis
2.1 Literature Review
Since, the idea of recommender system developed in mid-1990s. In past 10 years there has been a enormous growth in the development of recommender sites. The people using the recommender systems is increasing rapidly that makes it very important for these systems to make recommendations that are close to user’s interest.

Jia Zhou and Tiejan Luo, has issued a paper on Collaborative Filtering applications. The paper describes about the collaborative filtering techniques which were currently in used in that generation.
SongJie Gong and Zhejiang proposes that ‘personalized recommendation systems’ are widely used in e-commerce websites to provide recommendations to the users.
Robert M Bell and Yehuda Koren, state that recommender systems provide recommendations to the users based on past user-item relationship. Based on past user-item relationship the neighbors are computed which makes the prediction easy.

Micheal Pazzani discuses about recommending data sources for news articles or web sites after learning the taste of the users by learning their profile.

Koren stated that the user tastes change with in the changing of time and developed a recommendation system implementing temporary data into ‘factor modeling’ and ‘item-item neighbor’ modeling.

‘Shambour and Lu’ examined the ‘recommender frameworks’ in the setting of the e-government space, and stated a consistent business accomplice proposal e-administrations for little to-medium organizations.
‘Yin and Peng’ given a sensible schema to the execution correlation among another suggestion calculation and the delegate acknowledged calculations.2.2 Requirement Analysis:
Tools RequiredThe tools required for our project are given below:
Software Tools
TMDB (The Movie Database)
It is an online database of information related to the movie, world film, TV program including cast production crew and fan base rating and review.

HTML (Hypertext markup language) – HTML5
HTML5 is used as front end for our project. It is a markup language that is used for organizing and presenting the content on World Wide Web.

CSS (Cascading Style sheet) – CSS3
CSS3 is used for presenting our document that is written in HTML5 .CSS is proposed to enable the separation of presentation and content, along with contents, layout colors, and fonts.
JS (JavaScript) – JS 1.8.1
JavaScript is a Client-side scripting language which helps on several factors to make the application dynamic and efficient. We are using JavaScript version 1.8.1 in our project to manipulate different functionalities of our system needs.

Ruby on Rails-2.5.1
Ruby on Rails, or Rails, is a server-side web application framework that is written in Ruby. Rails are a model view controller framework that provides default structures for a database, web pages and web services. It encourages the use of HTML CSS and JS for display and user interfacing.

PosrgreSQL-10
It is an object relational database management system with an emphasis on extensibility and standards compliance. It stores data securely and return that data in response to requests from other software applications.

Hardware Tools
Laptops or PC with minimum system requirement of
Operating System: Microsoft Windows, Vista, XP or higher
Processor: 800MHz Intel Pentium III or higher
Memory: 512MB
Disk space: 750 MB or higher2.2.1 Functional Requirement
This project basically describes how the system reacts to particular inputs and how the system should behave to particular situation. The functional requirements of the project are mainly categorized as user requirements and device requirement each of which are explained below:
• User Requirement: User profile should be created and user must select at least one value of likes or dislikes based on preferences of our project for the movie recommendation.

• Device Requirement: System must be initiated on web-browser.

For our system ‘Movie Recommender System’, the functional requirements are as follows:
User data collection functionality that can be used to review their data.

One user’s rating can be helpful and useful to other users for recommending movies.

Decrease in the searching process for a user and navigation time.

Help users to find the information of related movie.

Use Case Diagram
Use case diagram can be helpful in understanding the functional requirement of movie recommendation system. In given figure, it shows the interaction between user and the system in particular environment.
-12382558102500
Fig: Use Case diagram of User
The above figure shows the major function of movie recommendation system. User is considered as an actor of the movie recommender system. The user can perform the function like registering account, viewing their profile, searching for movie, rate on movie and get recommended movies.

2.2.2 Non- Functional requirement
Non-functional requirements define the overall qualities or attributes of our system project. So, the non-functional requirements for the project are:
Usability:
Every customer can use this Website easily.

Performance:
The system software use very less amount of memory. Customer can complete the operations in a short interval of time.

Reliability:
Whenever user calls system over a particular period of time, the system delivers the expected services.
Security
The system is secured. Unauthorized access to the system and the data are not allowed. It has guaranteed to the security of user information. Only admin user should know the id and password. All data is protected and not accessible by others.

Availability
The portal provides proper service to the user when it is run.

2.3 Feasibility Analysis
Here we have analysis and evaluation of a proposed project to determine if it is technically feasible, if it is feasible within the estimated cost, and if it will be profitable. Here are some key factors to evaluate feasibility are as follows: 2.3.1 Economical FeasibilityHere we will show the analysis of a project’s costs and expenses in an effort to determine whether or not it is logical and possible to complete. Here we have cost on printing document, transportation and internet cost. We don’t require special hardware and software for this project. Laptops and required software are easily available. We need at least minimum 2 laptops which may cost Rs.60000 each. Since, we hosted the system on Heroku cloud hosting service that is free of cost for limited use. So, the system can be considered as economically feasible for our project.

2.3.2 Operational Feasibility
Our project gives the correct outcomes based in user input. So our project will be feasible in term of operation. It enables us ease of use and low learning curve. System is designed as operationally feasible as the system can be operated with the resource as of personal computer that is browser. The project is developed as the website allows the easy access to the several users. The system analyzes and processes the data from the users and based on their data, system works to afford recommendation. The information will be reliably provided to the users about movie description and many more.

2.3.3 Technical Feasibility
All the tools and software products required to construct our system is easily available in the web. Windows OS and Linux are used. Requirement hardware and software are easily available. Since all the tools and software products required for constructing movie recommender system is easily available. It does not require special environment to execute. It needs a web server and a DBMS to operate. The operation makes use of internet.

2.3.4 Schedule Feasibility
We divide the task among the group based on our knowledge and capabilities. Special planning was performed by planning and time management. Since, the project is completed in estimated timeframe. The time duration of each task is set. It takes about 4 months to complete our project. We performed the task and project based on given Schedule table:
Table: Schedule table for our project
-7620093345SN Task name Duration start Finish
1 Research and analysis 3 days 13 April 15 April
2 Proposal defense 2 days 16 April 17 April
3 Algorithm Study 10 days 18 April 27 April
4 System Design
15 days 28 April 13 may
5 Coding and Integration 30 days 14 May 18June
6 Testing 15 days 19June 5July
7 Output analysis and debugging
20 days 5 July 25 august
8 Documentation
3 .5month 12 April August 30
00SN Task name Duration start Finish
1 Research and analysis 3 days 13 April 15 April
2 Proposal defense 2 days 16 April 17 April
3 Algorithm Study 10 days 18 April 27 April
4 System Design
15 days 28 April 13 may
5 Coding and Integration 30 days 14 May 18June
6 Testing 15 days 19June 5July
7 Output analysis and debugging
20 days 5 July 25 august
8 Documentation
3 .5month 12 April August 30

Fig: Grant Chart
2.4 Structuring System Requirement
2.4.1 Data Modeling
2.4.1.1 ER Diagram

Fig: ER-diagram of movie recommender System
The ER diagram shows the entities used in the system and relationship between them is given. The entities in the system are:
1. User: It consists of attributes user name, email, password and has one to one relationship with entity User Profile and one to many relationship with entity Movie
2. User Profile: It consist of attribute User name, Genre rating, profile pictures and email and has one to one relationship with User.

3.Movie: It consist of attributes image, overview, Title, related movies and one to one relation with movie description and many to one with User .

4. Movie description: It consists of attributes image, titles, overview, release date, budget and has one to one relation with movie and rating item.

5. Rating form: It has attribute of numeric rating and has one to one relation with movie description.

2.4.1.2 Class Diagram
In the given figure of class diagram, it indicates the static structure of an object-oriented model: the object classes, their internal structure and the relationship in which they participate. A class is represented by a rectangle with three compartments separated by horizontal lines. The class name in the top compartment, list of attributes in the middle and list of operations in the bottom compartment. Here we have 5 classes having different attributes on each class with their respective operations.

-762003810000 Here the user class has the operation of creating user, login and rating movies.User Profile class has basic operaton of rating on category or prefernce of movie. Similarly, movie class help in displaying related movie. Descrption class operates to display the description or overview of movie. Movie rating class is used for input or displaying rating of user.

2.4.2 Process Modeling
2.4.2.1 Activity Diagram
In the given Activity Diagram, it describes the dynamic aspects of the system. Here, the diagram shows user oriented view of system operation.

381034163000
Fig: Activity Diagram
The above diagram shows the activity diagram of the system. It depicts how the user interacts with system. Initially, user login into the system providing the basic user profile information. Afterwards, user search for a movie and rate on movie. Then system uses algorithm to find the similarity with other users and then movie is recommended to the user.

2.4.2.2 Sequence Diagram
Here, a sequence diagram shows the flow of the project. It shows several modules and also the messages passed in between them. In the figure, different modules of the project are shown. Authentication, Movie Database, Object are the modules and the function of each module is shown in figure.

left41275000
Fig: Sequence Diagram
Chapter 3: System Design
3.1 System Design
The system uses the information of user and with the help of their information and rating values, movies are recommended to the users. System uses collaboration filtering technique .In order to recommend movies we have to find the similarity of user with other users. For this, we have used cosine similarity algorithm to find the similarity between the user based on their preferences like action, comedy and romance.

3.2.1 Interface Detail Design
The design phase includes planning different stages for implementing the software. Result of a process is seen in the output of the system. The design of output requirement carried out with much user friendliness. The system delivers messages for user friendliness. Screen is provided with help menus and messages so that they can help users at problematic conditions. It also provides error message wherever it is necessary.

In the user login screen, the user enters the login id and password after signup process. After login into the system the user home page opens and gets recommendations, rate movies, and logout. There is also search option of movie.

When clicked on the home link, the movies reviewed recently are displayed along with the movies rated most highly are also present in home page.

When clicked on signup link, users profile is created with their username and password. They also need their profile pictures. After signup they can search movies and rate movie.-340995-91440000
3.2.2 Input Output Design
Algorithm:
The algorithm used in this project is User Based Collaborative filtering using Cossine Similarity.

Similarity= cosine (?) = (A.B)/ (|A|.|B|)
This ratio is used as a similarity measure between any two users denoted by cossine (A, B)
This algorithm takes preference of user for different genre of movie:
Action (Like or Dislike)
Romantic (Like or Dislike)
Comedy (Like or Dislike)
User gives their preference for these three genres of movie, “Action” “Romantic” and “Comedy” while user registered in these systems.

16764068326000In sign up form:
Now based on the data collected from user while user registered in the system. The record for the user is created on the basis of above mentioned three genre of movie. Here if user has selected “like” for any particular genre , it is treated as “1” and if user has selected “dislike” then it is treated as “0”, i.e. :
Like is treated as “1”.

Dislike is treated as “0”.

User preference table:
Action Comedy Romantic
User1 1 1 1
User2 1 0 0
User3 0 0 1
User4 1 1 1
So on the basis of this obtained result, “Cossine Similarity” is used for finding the most closed or similar user that has similar preference of a movie to a particular user.

Algorithm to find closeness of current user to others users :Cossine similarity:

Here, u.rates is the cossine similarity between current user and the user with whom similarity with current user is being calculated.

For example:
Action Comedy Romantic
User1 1 1 1
User2 1 0 0
User3 0 0 1
Current_user 1 1 1
Here, Current_user has preference “like” for all three genre of movie. So, current_user value for three genre of movie is (1, 1, 1).

Now using cossine similarity , if we try to find most close user to current user then it will be “User1” because “User1” value for three genre of movie is also (1,1,1).

i.e.:Cossine(current_user,User1)=((current_user.romance*u.romance)+(current_user.comedy*u.comedy)+(current_user.action*u.action))/(Math.sqrt(current_user.romance**2+current_user.comedy**2+current_user.action**2)*Math.sqrt(u.romance**2+u.comedy**2+u.action**2))
= (1*1+1*1+1*1) / (?(1²+1²+1²)* (?(1²+1²+1²)*)
=1
Like this using cossine similarity formula, closeness of all the users with current user can be calculated. Higher the cossine similarity value higher will be the closeness.

Movie Rating:
In this application user can search for a particular movie and can give rating to that movie out of 5.

33210535877500Search for a movie
564515465455002. Give rating to the movie
Now the last part of algorithm is that, after finding closeness of current user to all the users in the system, we find the movie that contains the rating of “4” or “5”.

That means in the above example , for the current user since using cossine similarity “User1” is the most closed user, so the movies that are rated “4 or 5” by the “User1” is recommended to the current user.Then algorithm again search for next close user after “User1” and recommend movies that contains rating of 4 or 5 rated by next closed user to current user.

Final algorithm for recommending movies to user:
;% @user.order(“rates DESC”).each do |u| %;
;% if u.id != current_user.id %;
;% u.reviews.order(“rating DESC”).each do |rev| %;
;% if rev.rating ;= 4 %;
;%= u.username %;
;%= rev.movie.title %;
;% if rev.movie.poster != nil %;
;%=image_tag(rev.movie.poster) %;
;% else %;
;%= image_tag(“no.jpg”) %;
;% end %;
;% end %;
;% end %;
;% end %;
;% end %;

3.2.3 Process Model
44132554673500 Flow Chart
Chapter 4: Implementation and Testing
Implementation
Since, we have many stages during our project. Firstly, we prepare a proper plan. We set budget and schedule. Then, we identify our objectives and goals for our project. Requirements are determined for our project. Then, we design the system process and planed our layout. Then, we choose our personnel, set schedules and budget and performed our planning tasks. We design our static web pages in which HTML, CSS, JS is used for front end and Ruby on Rails is used as Backend.
-39687534925
Fig: SDLC for movie recommender system
4.1.1 Implementation tools:
Front end:
Hypertext Markup Language(HTML)
HTML5 is used as front end for our project. It is a markup language that is used for structuring and presenting the content on World Wide Web.

Cascading Style Sheets (CSS)
CSS3 is used for presenting our document that is written in HTML5 .CSS is intended to enable the separation of presentation and content, along with layout, content, fonts and colors.

JavaScript (JS)
JS 1.8.1 is used for both backend and frontend. It is characterized as dynamic, prototyped based and multi-paradigm.

.
Back end:
Ruby on rails-5.1
Ruby on Rails, or Rails, is a server-side web application framework that is written in Ruby. Rails is a model view controller framework, that provides default structures for a database, web service and web pages. It encourages the use of HTML CSS and JS for display and user interfacing.

JavaScript (JS)-1.8.1
JavaScript is a Client-side scripting language which helps on various factors to make the application dynamic and systematic. We are using JavaScript version 1.8.1 in our project to manipulate different functionalities of our System needs.

PostgreSQL-10
It is an object relational database management system with an emphasis on extensibility and standards compliance. It stores data securely and return that data in response to requests from other software applications.

Operating System Windows 10, Linux
IDE Visual Studio 1.25
Database Server PostgreSQL, TMDB
Programming Language Ruby on Rails
Developer side:
Table 1: Developer Software Requirements
Client side:
Table SEQ Table * ARABIC 2 : Client Software RequirementsBrowsers Opera, Mozilla, Internet explorer, Chrome
Server Side:Table SEQ Table * ARABIC 3 : Server Software Requirements
Operating System Linux
Web Server Rails Server
Database Server PostgreSQL Server
4.2 Testing
Testing is done to evaluate the software against requirements collected from users and system specifications. Software system testing identifies important flaws, errors, defects, in the application code that must be fixed. Testing is done at the phase level in software development life cycle or at module level in program code. Software testing includes the Validation and Verification of testing.

4.2.1 Unit Testing
For Unit Testing, we have tested the individual testable part of the system independently. We have done that manually like Login module, Registration module.

4.2.2 Integration Testing
After unit testing is performed, we performed Integration testing in which we combine the modules and performed testing.

The content is logically arranged and easy for users to understand. We have checked for spelling errors. We also check that pages adhere to color and pattern style guidelines, including fonts, frames, and borders. Since, the images also loaded correctly and with proper sizes.

4.2.3 System Testing
During the designing process, this project had so many bugs which were debugged one by analysing the problem occurred on each steps. This project has gone through following testing procedure.

S. N Test Cases Expected Results
1. Form Validation Registration error indicating missing information
2. User Authentication Error Indicating Incorrect Username or Password.

3. Session management Maintain the User Session period.

5. Browser Compatibility Web application that for correct function on several browsers, including Firefox, IE, Chrome, Opera
6. Operating Environment Compatible Compatible on all OS supporting Web Browser
7. Server Connection 404 Error may arise during Server error
8. Database Connectivity No database found error may arise
9. Syntax error Programming syntax error may arise
10. Device Compatibility Devise such as mobile, tablet, pc, gear may arise error.

Table: Test Cases
Chapter 5: Implementation and Support
Maintenance and Support
The main objective of maintenance and support is to make the system error free at all times possible. This can be achieved by constantly looking for bugs and taking feedback from users who access this system. Sometimes the system might also experience unknown bugs in the programming logic itself which should be tackled swiftly. Similarly, this system might experience lagging due to heavy traffic and it should be managed accordingly.
Client may Contact Developers any time for any kinds of problems in the System. And our Developers are always available for the Support of their Clients.

Chapter 6: Conclusion
6.1 Conclusion
Movie is recommended to the users on the basis of their interest, rating and preference
The aim of this application is to implement the collaborative filtering algorithm that will forecast the feature of movie on the basis of record and data collected from user. The Collaborative filtering takes input from users and collaborates user input to get best suitable feature (Rating) for the movie. But we face few disadvantages, that due to lack of data, all information might not available for users and some information can be outdated.

6.2 Future Works
It can be installed in Apache Server and so it can be also published in internet. Data can be updated continuously and we can make it as online rating predictions to the users. As a result, it can be finely satisfying current user tastes.

Due to time constraints and other factors some of the features, we unable in the preliminary stage of the development. Some of the features which currently could not be incorporated are:
User can only rate on movies but cannot comment on related movie and give feedback on them.

Users can get the information about movies and some of their deception but they are unable to watch public review and trailer.

REFERENCES

“Introduction to Recommender Systems Handbook”. Francesco Ricci, Lior Rokach and Bracha Shapira, 2011

“Recommender Systems for the web” J.Ben Schafer, Joseph A Konstan John T Reidl, 2006

Recommender System- Wikipedia, the free encyclopedia, 2013
“Towards an Introduction to Collaborative Filtering”. Jia Zhou, Tiejian Luo, 2009

“Extraction and integration of MovieLens and IMDb Data”. Veronika Peralta, 2007
Scalability-Wikipedia, the free encyclopedia
Correlation and dependence- Wikipedia, the free encyclopedia
Statistical dependence: Independence, Correlation and dependence, Copula, Spearman’s rank correlation coefficient
“A Collaborative Filtering Recommendation Algorithm based on User Clustering and Item Clustering”. SongJie Gong, Zhejiang Business Technology Institute, 2010
“Improved Neighborhood-based Collaborative Filtering”. Robert M. Bell and Yehuda Koren, 2007
“Collaborative Filtering with temporal dynamics”. Y. Koren, 2009
“Collaborative Filtering in a Non-Uniform World.” R. Salakhutdinov, N. Sebro, 2010
“A Hybrid trust-enhanced collaborative filtering recommendation approach for personalized government-to-business e-services”. Q. Shambour, 2011
APPENDIX
Index.html.erb(landing page Code):
<%ifuser_signed_in?%>
<div class=”row”>
<div class=”col-xs-12 col-md-6 col-md-offset-3″>
<h1 class=”text-center” style=”color:purple “>Search Movie</h1>
<div class=”row”>
<form id=”movie-search”>
<div class=”col-xs-8″>
<input type=”text” name=”query” class=”form-control” placeholder=”Enter Movie Name”>
</div>
<div class=”col-xs-4″>
<button type=”submit” class=”btn btn-success”>Search</button>
</div>
</form>
</div>
</div>
<br/>
<div class=”col-xs-12 col-md-6 col-md-offset-3 ” style=”margin-top:50px “>

<div id=”movies”>
<h1 style=”color:green”>Recent Reviewed Movie: </h1>
<% @movie.each do |m| %>
<div class=”box panel panel-default pull-left”>
<div class=”panel-body”>
<p><h3 style=”color:red”><%= m.title %></h3></p>
<% Tmdb::Api.key(“3deceb9041e72a8856191ddeaf96a293”) %>
<% Tmdb::Api.language(“en”) %>
<% if m.poster != nil && Tmdb::Movie.posters(m.tmdb_id).first != nil %>
<% @mov = Tmdb::Movie.posters(m.tmdb_id).first.file_path %>

<%= image_tag(“https://image.tmdb.org/t/p/w185#{@mov}”) %>
<% else %>
<%= image_tag(“no.jpg”) %>
<% end %>
</div>
</div>
<% end %>
</div>

</div>
</div>
<h1 style=”color:blue”>Recommendation: </h1>
<% @user.each do |u| %>
<% if u.id != current_user.id && u.romance == current_user.romance && u.comedy == current_user.comedy && u.action == current_user.action %>
<% u.reviews.each do |rev| %>
<% if rev.rating >= 4 %>
<h3 style=”color:green”> <%= u.username %> </h3>
<h3 style=”color:red”> <%= rev.movie.title %> </h3>
<% if rev.movie.poster != nil && Tmdb::Movie.posters(rev.movie.tmdb_id).first != nil %>
<% @mov = Tmdb::Movie.posters(rev.movie.tmdb_id).first.file_path %>

<%= image_tag(“https://image.tmdb.org/t/p/w185#{@mov}”) %>
<% else %>
<%= image_tag(“no.jpg”) %>
<% end %>
<% end %>
<% end %>
<% end %>

<% end %>
<% else %>
<h1> PLEASE LOG IN </h1>
<% end %>
Profile.html.erb(User Profile Code)
<h3> Name: </h3>
<%= current_user.username%>
<h3> Email: </h3>
<%= current_user.email %>
<h3> Profile Picture </h3>
<%= image_tag current_user.photo ,class: ‘picture’ %>
<h3> Action Movie Rating: </h3>
<%= current_user.action %>
<h3> Romance Movie Rating: </h3>
<%= current_user.romance %>
<h3> Comedy Movie Rating: </h3>
<%= current_user.comedy %>
<br/>
<br/>
<h3 style=”color: blue”> MOVIES RATED </h3>
<% @review.each do |rev| %>
<% if rev.user.id == current_user.id %>
<h3 style=”color: red”> <%= rev.movie.title %> </h3>
<h4 style=”color: green”> <%= rev.rating %> </h4>
<% end %>
<% end %>
New.html.erb(Login Page Code)
<h2>Log in</h2>
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class=”field”>
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true %>
</div>
<div class=”field”>
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: “off” %>
</div>
<% if devise_mapping.rememberable? -%>
<div class=”field”>
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
<% end -%>
<div class=”actions”>
<%= f.submit “Log in” %>
</div>
<% end %>
<%= render “devise/shared/links” %>
New.html.erb(SignUp Page Code)
<h2>Resend confirmation instructions</h2>
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
<%= devise_error_messages! %>
<div class=”field”>
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
</div>
<div class=”actions”>
<%= f.submit “Resend confirmation instructions” %>
</div>
<% end %>
<%= render “devise/shared/links” %>
Application.html.erb(Main Application Layout Code)
<!DOCTYPE html>
<html>
<head>
<title>CollegeProject</title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag ‘application’, media: ‘all’, ‘data-turbolinks-track’: ‘reload’ %>
<%= javascript_include_tag ‘application’, ‘data-turbolinks-track’: ‘reload’ %>
<%= javascript_tag “window._token = ‘#{form_authenticity_token}'” %>
</head>
<body>
<nav>
<div class=”row”>
<div class = “col-lg-6 col-lg-offset-3″>
<div class=”row”>
<div class=”nav_wrapper”>
<div class=”col-xs-3″>
<span class=”pull-left brand”><%= link_to ‘Hernajau.com’, root_path %></span>
</div>
<!– <div class=”col-xs-6″> –>
<% if user_signed_in? %>

<%= link_to ‘Profile’, profile_path , class: ‘btn btn-small btn-warning’ %>
<div class=”col-xs-3″> <span class=”nav_links pull-right”><%= link_to ‘Edit Settings’, edit_user_registration_path %></span></div>
<div class=”col-xs-3″> <span class=”nav_links pull-right”><%= link_to ‘Log Out’, destroy_user_session_path, method: :delete %></span></div>
<% else %>
<span class=”nav_links pull-right”><%= link_to ‘Sign Up’, new_user_registration_path %></span>
<span class=”nav_links pull-right”><%= link_to ‘Log In’, new_user_session_path %></span>
<% end %>
</div>
</div>
</div>
</div>
</div>
</nav>
<%= yield %>
</body>
</html>
Show.html.erb(Show User Code)
<h3> Name: </h3>
<%= @user.username%>
<h3> Email: </h3>
<%= @user.email %>
<h3> Profile Picture </h3>
<%= image_tag @user.photo ,class: ‘picture’ %>
<h3> Action Movie Rating: </h3>
<%= @user.action %>
<h3> Romance Movie Rating: </h3>
<%= @user.romance %>
<h3> Comedy Movie Rating: </h3>
<%= @user.comedy %>
Main.js(Main JavaScript Code)
$(function(){
let form = $(‘#movie-search’);
form.submit(function(e){
e.preventDefault();
$.ajax({
url: ‘https://api.themoviedb.org/3/search/movie?api_key=3deceb9041e72a8856191ddeaf96a293’,
data: form.serialize()
})
.done(function(data){
displayMovies(data);
});
});
$(‘#movies’).on(‘click’,’img.movie_poster’,function(e){
e.preventDefault();
let id = $(e.target).data(‘id’);
$.ajax({
url: ‘https://api.themoviedb.org/3/movie/’ + id + ‘?’,
data: {‘api_key’ : ‘3deceb9041e72a8856191ddeaf96a293′}
})
.done(function(data){
displayMovie(data)
})
});
function displayMovies(data){
let container = $(“#movies”);
let htmlString = “”;
container.empty();
let imageUrl = getBaseImageUrl();
if (data”results”.length == 0) {
htmlString = `<div class=”alert alert-danger text-center” role=”alert”>No Data Found!</div>`;
}
else{
data”results”.forEach(function(movie){
htmlString += `
<img src=${movie”poster_path” == null ? “/assets/no.jpg” : imageUrl + “/” + movie”poster_path”} data-id=”${movie’id’}” class=”movie_poster”/>
<h6 style=”color:green”> (*** Click image to give rating ***) </h6>
<p>${movie”title”}</p>
<p>${movie”overview”}</p>`;
});
}
container.append(htmlString);
}
function displayMovie(movie){
let container = $(“#movies”);
let htmlString = “”;

var imageUrl = getBaseImageUrl();
container.empty();
htmlString +=
`

<img src=${movie”poster_path” == null ? “/assets/no.jpg” : imageUrl + “/” + movie”poster_path”} data-id=”${movie’id’}” class = “movie_poster” />
<h1>${movie”title”}</h2>
<br /> <br /> <br /> <br />
<h3>Vote Average:${movie”vote_average”}</h3>
<b> Adult:</b> ${movie”adult”}<br />
<b>Overview: </b> ${movie”overview”}<br />
<b>Original Title: </b> ${movie”original_title”}<br />
<b>Original Language: </b> ${movie”original_language”}<br />
<b>Release Date: </b> ${movie”release_date”}<br />
<b>Plot: </b> ${movie”plot”}<br />
<b>Runtime: </b> ${movie”runtime”}<br />
<b>Released: </b> ${movie”released”}<br />
<b>Genre: </b> ${movie”genre”}<br />
<b>Language: </b> ${movie”language”}<br />
<b>Budget: </b> ${movie”budget”}<br />
<b>Homepage: </b> ${movie”homepage”}<br />
<b>Tmdb Id: </b> ${movie”tmdb_id”}<br />
<b>Imdb Id: </b> ${movie”imdb_id”}<br />
<b>Popularity: </b> ${movie”popularity”}<br />

<form id=”rating-form” action=”/reviews” method=”POST”>
<input type=”hidden” name=”authenticity_token” value=${window._token} />
<input type=”hidden” name=”tmdb_id” value=${movie”id”} />
<b> Ratings: </b>
<input type=”text” name= “reviewrating” class=”form-control” placeholder=”Ratings out of 10″>
<br />
<input type=”submit” class=”btn btn-success pull-right” />
</form>
`;
container.append(htmlString);

}

function getBaseImageUrl(){
var url = “”;
var settings = {
“async”: false,
“crossDomain”: true,
“url”: “https://api.themoviedb.org/3/configuration?api_key=3deceb9041e72a8856191ddeaf96a293”,
“method”: “GET”,
“headers”: {},
“data”: “{}”
}
$.ajax(settings).done(function (response) {
url = response”images””base_url” + response”images””poster_sizes”3;
});
return url;
}
});
CSS Code:
nav.scss(Navbar Code)
// Header Styles
.site-header {
padding: 10px 0 5px 0;
*zoom: 1; }
.site-header:after {
content: ” “;
clear: both;
display: block;
overflow: hidden;
height: 0; }

//Branding

#branding {
float: left;}
#branding .logo, #branding .logo-copy {
display: inline-block; }
#branding .logo {
margin-right: 5px; }
// #branding .site-title {
// margin: 0;
// text-transform: uppercase;
// color: rgb(58, 2, 2);
// font-size: 16px; }
// #branding .site-title a {
// color: rgb(3, 5, 107); }
// #branding .site-description {
// font-size: 13px;
// color: #26575e; }

//Navigation
.main-navigation {
float: right;
background: rgb(26, 0, 0);
border-radius: 5px;
margin: 60px 40px;}
.main-navigation .menu-toggle, .main-navigation .menu, .main-navigation .search-form {
display: inline-block;
vertical-align: middle; }
.main-navigation .menu-toggle {
color: #333;
border: none;
background: none;
font-size: 18px;
font-size: 1.2em;
padding: 8px 15px;
display: none;
outline: none; }
@media screen and (max-width: 990px) {
.main-navigation .menu-toggle {
display: inline-block; } }
@media screen and (min-width: 991px) {
.main-navigation .menu-toggle {
display: none !important; } }
.main-navigation .menu {
list-style: none;
margin: 0; }
@media screen and (min-width: 991px) {
.main-navigation .menu {
display: inline-block !important; } }
@media screen and (max-width: 990px) {
.main-navigation .menu {
display: none; } }
.main-navigation .menu-item {
display: inline-block;
padding: 10px 0; }
.main-navigation .menu-item a {
padding: 0 15px;
display: inline-block;
color: #84878d;
font-size: 14px;
font-size: 0.9333333333em;
font-weight: 400;
line-height: 1;
border-right: 1px solid #eeeeef; }
.main-navigation .menu-item.current-menu-item, .main-navigation .menu-item:hover {
position: relative; }
.main-navigation .menu-item.current-menu-item:after, .main-navigation .menu-item:hover:after {
content: ” “;
position: absolute;
width: 80%;
height: 3px;
background-color: #ffaa3c;
bottom: -3px;
left: 0;
right: 0;
margin: 0 auto;
display: block; }
.search-form{
input{
background-color: #f0f0f0;
border: none;
// border-left: 1px solid white;
border-radius:2px solid rgb(26, 0, 0);
font-family: inherit;
font-weight: 300;
width: 0;
visibility: hidden;
opacity: 0;
transition: .3s ease;
padding: 10px 0;

&.active{
width:200px;
visibility: visible;
opacity: 1;
padding: 10px;
}
}
button{
background-color: transparent;
border:none;
// border-left: 1px solid white;
border-radius: 0;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
margin-left: -5px;
color: inherit;
box-shadow: none;
outline: none;
transition: .3s ease;

&.active{
background-color: #f0f0f0;
}
}
}
Footer.scss(Footer Code)
/*
* Footer Styles
*/
.site-footer {
background-color: #0e0e16;
padding: 50px 0; }
.site-footer .widget {
margin-bottom: 30px; }
.site-footer .widget-title {
color: #bec1c8;
font-weight: 300; }
.site-footer .subscribe-form inputtype=”text” {
width: 100%;
border: 1px solid #bec1c8;
background-color: transparent;
background-image: url(./arrow.png);
background-repeat: no-repeat;
background-position: right center;
color: inherit;
font-size: 13px;
font-size: 0.8666666667em;
-webkit-transition: .3s ease;
transition: .3s ease; }
.site-footer .subscribe-form inputtype=”text”:focus, .site-footer .subscribe-form inputtype=”text”:hover {
border-color: #ffaa3c; }
.site-footer a {
color: #84878d;
-webkit-transition: .3s ease;
transition: .3s ease; }
.site-footer a:hover {
color: #ffaa3c; }
.site-footer .colophon {
padding-top: 30px; }

.site-footer .colophon {
padding-top: 30px;
text-align: center;}
movies.scss(Main Body Code)
footer,
header,
nav,{
display: block;}
html,body {
background: #fff;
color: #000;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
height: 100%;
width: 100%;
}
/*
* Global Styles
*/
html,
button,
input,
select,
textarea {
font-family: sans-serif; }
body {
background-color: #c1cccbe5;
color: #84878d;
font-family: “Roboto”, “Open Sans”, sans-serif;
font-size: 15px;
font-weight: 400;
line-height: normal;
margin: 0;}

h1, h2, h3, h4, h5, h6 {
font-weight: 700;
margin: 0 0 20px; }

hr {
border: none;
border-bottom: 1px solid #777; }

ul, ol {
margin: 0;
padding-left: 0; }

a {
text-decoration: none;
color: #ffaa3c; }

address {
font-style: normal; }

p {
margin-top: 0; }

form input, form textarea, form select {
outline: none;
border: 1px solid #ccc;
padding: 10px;
border-radius: 5px;
outline: none; }
form select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; }
form textarea {
resize: vertical; }
.wrapper{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
.contents{
width: 100%;
height: auto;
margin: 0;
padding: 0;
}
/*
* Reusable Components Style
*/
.button, form inputtype=”submit”, form button, form inputtype=”reset”, .contact-form inputtype=”submit” {
border: none;
background: #ffaa3c;
padding: 10px;
border-radius: 3px;
color: #92601e;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
-webkit-transition: .3s ease;
transition: .3s ease; }
.button:hover, form inputtype=”submit”:hover, form button:hover, form inputtype=”reset”:hover, .contact-form inputtype=”submit”:hover, .button:focus, form inputtype=”submit”:focus, form button:focus, form inputtype=”reset”:focus, .contact-form inputtype=”submit”:focus {
background-color: #ffc06f; }
.slider {
position: relative;
margin-bottom: 10px; }
.slider .slides {
list-style: none;
*zoom: 1; }
.slider .slides:after {
content: ” “;
clear: both;
display: block;
overflow: hidden;
height: 0; }
.slider li {
border-radius: 5px;
overflow: hidden; }
.slider img {
max-width: 100%;
width: 100%;
height: auto;
display: block; }
.slider .flex-direction-nav {
list-style: none;
z-index: 2;
position: absolute;
top: 45%;
width: 100%; }
.slider .flex-direction-nav a {
width: 45px;
height: 45px;
border-radius: 50%;
background: white;
text-align: center;
line-height: 2.5;
font-size: 18px;
font-size: 1.2em;
display: block;
position: absolute;
-webkit-transition: .3s ease;
transition: .3s ease; }
.slider .flex-direction-nav a:hover {
background-color: #ffaa3c;
color: white; }
.slider .flex-direction-nav .flex-prev {
left: 30px; }
.slider .flex-direction-nav .flex-next {
right: 30px; }
.latest-movie {
margin-bottom: 30px;
border-radius: 5px;
overflow: hidden;
height: 100%; }
.latest-movie img {
max-width: 100%;
width: 100%;
display: block;
height: 250px; }
.container {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
*zoom: 1; }
.container:after {
content: ” “;
clear: both;
display: block;
overflow: hidden;
height: 0; }
@media (min-width: 768px) {
.container {
width: 750px; } }
@media (min-width: 992px) {
.container {
width: 970px; } }
@media (min-width: 1200px) {
.container {
width: 1170px; } }
.container-fluid {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
*zoom: 1; }
.container-fluid:after {
content: ” “;
clear: both;
display: block;
overflow: hidden;
height: 0; }
.row {
margin-left: -15px;
margin-right: -15px;
height: 40%;
width: 100%;
margin-bottom: 20px;
*zoom: 1; }
.row:after {
content: ” “;
clear: both;
display: block;
overflow: hidden;
height: 0; }
.main-content .container {
background: white;
border-radius: 5px;
padding: 30px; }

.no-bullet {
list-style: none; }
.leading {
font-size: 26px;
font-size: 1.7333333333em;
font-weight: 300; }
.page figure {
margin-bottom: 30px; }
.page img {
max-width: 100%; }
.page .movie-title {
font-size: 36px;
font-size: 2.4em;
font-weight: 300; }
.filters {
margin-bottom: 50px; }
.filters select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding: 10px 50px 10px 10px;
background-color: #e7e7e7;
border-radius: 5px;
border: none;
margin-right: 10px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
outline: none;
background-image: url(images/select.png);
background-repeat: no-repeat;
background-position: 100% center; }
.movie-list {
margin: 0 -15px; }
.movie-list .movie {
width: 25%;
padding: 0 15px;
float: left;
margin-bottom: 30px; }
@media screen and (min-width: 991px) {
.movie-list .movie:nth-child(4n+1) {
clear: both; } }
@media screen and (max-width: 990px) {
.movie-list .movie {
width: 50%; }
.movie-list .movie:nth-child(4n+1) {
clear: none; }
.movie-list .movie:nth-child(2n+1) {
clear: both; } }
@media screen and (max-width: 480px) {
.movie-list .movie {
width: 100%;
clear: both; } }
.movie-list .movie .movie-poster {
border-radius: 5px;
overflow: hidden;
margin-bottom: 20px;
border: 1px solid transparent; }
.movie-list .movie .movie-poster img {
display: block;
width: 100%;
max-width: 100%;
height: auto;
-webkit-transition: .3s ease;
transition: .3s ease; }
.movie-list .movie:hover img {
-webkit-transform: scale(1.2);
-ms-transform: scale(1.2);
transform: scale(1.2); }
.movie-list .movie .movie-title {
font-size: 24px;
font-size: 1.6em;
font-weight: 300;
margin-bottom: 20px; }
.movie-list .movie .movie-title a {
color: #84878d;
-webkit-transition: .3s ease;
transition: .3s ease; }
.movie-list .movie .movie-title a:hover {
color: #ffaa3c; }
Form.scss(Form Code)
@import url( HYPERLINK “https://fonts.googleapis.com/css?family=Roboto:300” https://fonts.googleapis.com/css?family=Roboto:300);
.signup-page {
width: 100%;
padding: 2% 0 0;
margin: auto;
height: 100%;
}
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 50%;
margin: 0 auto 100px;
padding: 45px;
text-align: left;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
height: auto;
}
.form input {
font-family: “Roboto”, sans-serif;
outline: 0;
background: #f2f2f2;
width: 100%;
border: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
}
.form .register-form {
display: none;
}
.signup-page{background: #76b852; /* fallback for old browsers */
background: -webkit-linear-gradient(right, #76b852, #8DC26F);
background: -moz-linear-gradient(right, #76b852, #8DC26F);
background: -o-linear-gradient(right, #76b852, #8DC26F);
background: linear-gradient(to left, #76b852, #8DC26F);
font-family: “Roboto”, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
Screenshots:
Recommended Movies

Search Movies