Professional Documents
Culture Documents
Dipesh Shrestha 1 PDF
Dipesh Shrestha 1 PDF
Dipesh Shrestha 1 PDF
I confirm that I understand my coursework needs to be submitted online via Google Classroom under the
relevant module page before the deadline in order for my assignment to be accepted and marked. I am
fully aware that late submissions will be treated as non-submission and a marks of zero will be awarded.
CU6051NI Artificial Intelligence
Table of Contents
Introduction........................................................................................................................1
Explanation of the topic related.....................................................................................1
Problem domain.............................................................................................................2
Explanation of the chosen topic.....................................................................................3
Background.......................................................................................................................4
Research on the topic....................................................................................................4
Research in similar topics..............................................................................................6
Solution..............................................................................................................................9
Explanation of proposed solution..................................................................................9
Explanation of algorithm used:......................................................................................9
Pseudocode of the solution.........................................................................................13
Diagrammatical Representation......................................................................................14
Flow chart....................................................................................................................14
State transition Diagram..............................................................................................15
Explanation of the development process........................................................................16
Achieved Results.............................................................................................................17
Conclusion.......................................................................................................................23
Analysis of the work.....................................................................................................23
Address to real world problem.....................................................................................24
Further work.................................................................................................................24
References......................................................................................................................25
Table of Figures
Figure 1 Filtering................................................................................................................4
Figure 2 Machine Learning................................................................................................5
Figure 3 Collaborating filter..............................................................................................10
Figure 4 User based collaborative filtering......................................................................11
Figure 5 Item based collaborative filtering.......................................................................12
Figure 6 Flow Chart.........................................................................................................14
Figure 7 state transition diagram.....................................................................................15
Figure 8............................................................................................................................17
Figure 9............................................................................................................................18
Figure 10..........................................................................................................................18
Figure 11..........................................................................................................................19
Figure 12..........................................................................................................................20
Figure 13..........................................................................................................................20
Figure 14..........................................................................................................................21
Figure 15..........................................................................................................................21
Figure 16..........................................................................................................................21
Figure 17..........................................................................................................................22
Introduction
• Reasoning
• Learning
• Problem solving
• Perception
• Linguistic intelligence [ CITATION Bei18 \l 1033 ]
Problem domain
Choosing a movie to see with friends on a night out may be difficult, and a lot of
time is wasted doing so. A user may view a film simply by looking at its cover or
narrative. Most of the time, the user starts viewing a movie and realizes halfway
through that it is a waste of time. Getting a suggestion from a friend may be quite
annoying since your taste in movies may differ from that of others. I want to create
a solution to this problem by developing a movie recommendation system.
Everybody loves to watch movies irrespective their age, gender, race, color and so
on. The most exciting fact is that how unique our selections and mixtures are in
terms of movies likings. A recommendation system is a filtration program whose
goal is to predict the ratings of a user towards a domain specific product or item. In
our case, the domain specific item is a movie, that is why the main focus of
recommendation system is to predict the movies which a user would prefer given
some user data.
Background
Recommendation system
Figure 1 Filtering
Machine Learning
With so much information on the internet and so many people utilizing it, it's
become critical for businesses to search for and offer data to their consumers
based on their needs and preferences. [ CITATION Rod19 \l 1033 ]
Many recommendation systems have been created that use collaborative, content-
based, or hybrid filtering approaches. These systems were built utilizing a variety
of big data and machine learning techniques.
with a basic introduction and describe current work in this subject, followed by a
data preparation part in which we show how to extend the original data with
characteristics obtained from IMDb. As approaches for a recommender system,
we will examine collaborative filtering (item-based, user-based, and single value
decomposition), content-based filtering, and hybrid filtering. After evaluating, the
singular value decomposition model came out as the most suitable model for this
dataset[ CITATION Ste18 \l 1033 ]
most popular music selection method: Discover Weekly. This method, and more
especially how linear algebra is utilized to power it, will be the subject of my
research. It should be mentioned that other firms, such as Last.fm, utilize a similar
concept to Spotify's, while the Netflix Prize promoted another. I'll be focusing only
on Spotify's Collaborative Filtering technique, which varies from Netflix's in that it
employs implicit input rather than explicit feedback like as ratings and other explicit
user data. It should also be noted that this is my interpretation of Spotify's
Collaborative Filtering based on my study, and it is highly unlikely to be accurate.
[ CITATION Sor19 \l 1033 ]
Customers' browsing history allows Amazon to keep the appropriate goods in front
of their eyes. Based on the use of user evaluations and ratings, it recommends
and sells the best-selling choice. Instead of selling you a product, Amazon is more
likely to sell you a box. Assume you've purchased an earring; it will then
recommend a matching necklace and bracelet. After that, it sends you an email
using a recommendation engine to keep you informed about new trends in that
area. Amazon also utilizes recommendations in email campaigns and website
pages for targeted marketing. As a result, Amazon begins proposing a variety of
products from various categories based on your browsing history and selects
those ones that you are most likely to purchase. Recommendation engines began
their journey in e-commerce, but they are now gaining traction in a variety of other
fields, including the media. [ CITATION Rod19 \l 1033 ]
Solution
Collaborative filtering refers to a set of algorithms that include various methods for
locating comparable people or objects, as well as numerous methods for
calculating ratings based on the ratings of similar users. You may end up with a
collaborative filtering method depending on your choices. You will learn about the
various methods for determining similarity and predicting ratings. [ CITATION
Abh12 \l 1033 ]
The main concept is to locate users who have similar previous preference
patterns as user "A" and then recommend to him or her things that those similar
users have enjoyed but that "A" has not yet experienced. This is accomplished
For example, if user 'A' like 'Batman Begins,' 'Justice League,' and 'The
Avengers,' and user 'B' enjoys 'Batman Begins,' 'Justice League,' and 'Thor,' they
have comparable interests because these films are all super-hero films. As a
result, there's a good chance that user 'A' will enjoy 'Thor,' whereas user 'B' will
enjoy 'The Avengers.' [ CITATION SO_20 \l 1033 ]
In this concept, the idea is to discover comparable movies rather than similar
users, and then propose similar movies to ‘A' based on his or her previous
choices. This is accomplished by locating every pair of things that were
rated/viewed/liked/clicked by the same user, calculating the similarity of those
rated/viewed/liked/clicked across all users who rated/viewed/liked/clicked both,
and then suggesting them based on the similarity scores. [ CITATION SO_20 \l
1033 ]
Here, for example, we take 2 movies ‘A’ and ‘B’ and check their ratings by all
users who have rated both the movies and based on the similarity of these
ratings and based on this rating similarity by users who have rated both we find
similar movies. So, if most common users have rated ‘A’ and ‘B’ both similarly
and it is highly probable that ‘A’ and ‘B’ are similar, therefore if someone has
watched and liked ‘A’ they should be recommended ‘B’ and vice versa.
[ CITATION SO_20 \l 1033 ]
IMPORT Libraries
READ Dataset
RESULT output
Diagrammatical Representation
Flow chart
Figure 6 Flow Chart
The whole system I built for this project is developed by using python programming
language. With the use of Anaconda, I completed a recommendation engine that is
used for movie recommendations. Anaconda is a Python and R programming language
for data science, machine learning, and other applications that makes package
management and deployment easier. Anaconda is a free software that runs on
Windows, Mac OS X, and Linux. The Jupyter Notebook IDE is used to write all of the
code for the recommendation engine. Anaconda prompt is used to install the libraries
required for the projects. The implicit library, which is closely related to ALS, was utilized
to create this project.
Kaggle was used to receive all the user data set that is bound to be used in this project.
The raw data received were converted into usable data. The project is based on the
principle of if the user likes movies, he may like the movies which are same as the
movies s/he watched. The data contains the movie history of the user along with the
ratings s/he has given.
To begin, a Python script was used to create a MovieRecommender class. The focus of
the class then shifts to making suggestions from the implicit library. All of the user's data
has been trained, data and models have been imported, and all of the user's data sets
have been used to generate the suggestion. The data is then assigned to the ALS
model, which generates a suggestion for the user. Finally, it is saved as a csv file, which
I have included in the table.
Achieved Results
The extracted data from Kaggle was retrieved in its raw form. We established a
separate file where we utilized the raw data and updated the document based on the
outcomes we needed for cleaning the raw data. Simple user data sets were produced
once the raw data file was converted to an appropriate file format and trained. Then,
five users' data are updated once the ALS algorithm is implemented. The movies that
are top rated from different users are reviewed and chosen for accurate
recommendation. The engine was able to propose up to 20 movies to the user with the
installation of the ALS algorithm. Different movies are recommended to the user at
different times. The data is also saved as a csv document in a separate file.
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Conclusion
Analysis of the work
The whole table introduced below shows the analysis of the work in this project.
This coursework includes all the research and the works I have done to complete
a recommendation system and collaborative filtering system on the topic of AI.
S.no
Topic Status
.
1. Research on AI Topic Completed
2. Choose and confirm AI Topic Completed
3. Research on Recommendation System Completed
4. Research on problem domain and solution Completed
5. Research on Collaborative Filtering Method Completed
6. Choose and confirm AI Algorithm Completed
7. Research on similar Projects Completed
8. Pseudocode and Flowchart Completed
9. Finalize research document Completed
10. Start of the project Completed
11. Train Data Sets Completed
12. Implementing ALS Completed
13. Project Outcome Completed
14. Finalization of the project Completed
15. Finalization of the documentation Completed
There are several movie recommendation systems available, but they all lack
certain features. They are yet to be improvised and get better recommendations
with better selections. They still recommend movies based on their ratings, but the
user's choices should be considered as well.
Further work
Following the completion of this class, we studied and learned about AI and
recommendation engines. We also learned about the recommendation system
and how the ALS algorithm works. We may be engaged on doing certain works
given below in future:
References
Ajitsaria, A. (2012). Real Python. Retrieved from Real Python:
https://realpython.com/build-recommendation-engine-collaborative-filtering/
Gosalia, V. (2018). International Research Journal of Engineering and Technology.
Movie Recommendation System, 301.
Nelson, S. (2019). Spotify’s Collaborative Filtering. Spotify’s Collaborative Filtering, 07.
Postmus, S. (2018). Recommender system techniques applied to Netflix movie.
Research Paper Business Analytics, 21.