Kshitiz Basnet
Kshitiz Basnet
Kshitiz Basnet
CU6051NA
Coursework 1
2019-20 Autumn
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 mark of zero.
Contents
1 Introduction ................................................................................................................... 1
2 Background ................................................................................................................... 4
3 Solution ....................................................................................................................... 11
4 Conclusion .................................................................................................................. 16
5 Bibliography ............................................................................................................... 18
6 Appendix ..................................................................................................................... 21
6.2 AI Today............................................................................................................... 21
Table of Tables
1 Introduction
Computers are used for almost everything in the present day. The computer technology
has helped humans in almost every field, from entertainment to scientific research.
Artificial Intelligence is the branch of science which is another astonishing development
in computer technologies.
“Artificial Intelligence is a branch of science which deals with helping machines find
solutions to complex problems in a more human-like fashion” (Sridhar, 2018).
Artificial Intelligence is rapidly evolving day-by-day. The growth of AI has helped many
industries like technology, education, manufacturing, entertainment etc. The tasks carried
out by AI is reliable and the outcome of the tasks like data can help in growth of industry
in the future.
i. According to Adobe, 46% of enterprises were expected to be using AI till the end
of 2019, share of jobs requiring AI has increased by 450% since 2013, investment
in AI startup by increased by six times since 2000.
ii. According to Stanford University, startups in AI has increased by astonishing
1400% since 200.
iii. According to IDC, Robot imports have increased from around 100,000 in 2000 to
roughly 250,000 in 2015.
(Utermohlen, 2018)
Kshitiz Basnet
17031231 1
CU6051NA Artificial Intelligence
i. Supervised Learning: It uses algorithms which learns from training dataset. The
learning stops when the algorithm achieves its goal. It is further categorized into
the following:
a. Classification
b. Regression
ii. Unsupervised Learning: It uses only input data but not a corresponding output
data. The goal of this type of machine learning is to model the underlying
structure of the data to know more about the data. It is further categorized into
the following:
a. Clustering
b. Association
iii. Semi supervised Learning: It uses large amount of input data and few
corresponding output data. This machine learning type falls in between
supervised and unsupervised learning.
(Brownlee, 2016)
The applications of Machine learning are virtual personal assistant, email spam
filtering, online customer support, product recommendations etc.
Kshitiz Basnet
17031231 2
CU6051NA Artificial Intelligence
For generations, humans have depicted their stories in dramas and this has influenced
people, their beliefs and their actions. Today, that depiction is made through movies, plays
and dramas.
Movie industry is one of the most influential and successful entertainment industry. “In
2018 alone the global box office revenue reached 41 Billion dollars and it is expected to
increase in coming years, according to Statista, a website which generates statistics on
media and advertisement.” (Watson, 2019) This data shows that people around the globe
love movies and are willing to spend their money watching them.
Movies are available in internet in various sites. Netflix, Fmovies, Bmovies are some of
the leading applications in streaming the movie online. The progress of technological
development has increased the amount of movies in an exponential manner. This
astronomical increase of movies found in the internet today has also impacted the movie
industry as well. A person is able to explore very vast amount of movies in the internet.
Although the internet stores large database of movies, the problems for the user are:
a. Person also lacks the ability to get the relevant movie he or she wants to
watch due to large amount of available movies.
b. The search for relevant content of movies for the user can be very tiresome
for a user as it can require lot of amount of time.
c. Sometimes the user might not find the movie that is he/she wants to watch
after hours of searching.
Kshitiz Basnet
17031231 3
CU6051NA Artificial Intelligence
2 Background
2.1 Research on Recommendation System
The recommendation system is the effective tool that can be used in the type of problem
mentioned in the problem domain section. A recommendation engine can show the
accurate recommendations to the user where the user can actually view the relevant
type of movies.
Basically, a recommendation system is used to list the items that the user might be
interested in viewing. This helps both the supplier of items, in this case a movie
application to have more users and also the user to get the relevant movies based on
their preference. The two main approaches towards constructing a recommendation
systems are described in detail in the next page.
Kshitiz Basnet
17031231 4
CU6051NA Artificial Intelligence
Content based recommendation systems use the content or the attributes of the
products that the user likes and according to that content the relevant product is
recommended to the user. The widely used algorithm used in this type of
recommendation engine is TF*IDF algorithm.
Kshitiz Basnet
17031231 5
CU6051NA Artificial Intelligence
b. Collaborative Filtering:
Collaborative filtering uses user’s behavior to suggest relevant items based on the
similar users of the system. There are two types of collaborative filtering:
This type of collaborative filtering compares most similar users and suggests
relevant product to the user.
In this type of collaborative filtering, the data of rating of items purchased
by the user is stored in a vector. The similarity between uses is calculated
using n*n matrix. Similarity is calculated using cosine similarity formula.
Then, recommendation matrix is calculated and value is calculated for all
items that are new for that user in descending order and top items are
recommended to user.
This type of collaborative filtering compares similar items rather than the
similar users. The difference in this type of collaborative filtering is that the
recommendation matrix is m*m matrix where m is number of items present
in the system.
a. It can work reliably and flexibly even if the system has large number
of users.
b. It is based on real life activity of user so, the connection between
disparate items can be made.
Kshitiz Basnet
17031231 6
CU6051NA Artificial Intelligence
a. The program can get in scalability problems when the number of users
and items gets too high.
b. The history of user cannot tell whether the item is liked by user or not
if the user does not rate an item which results in data sparsely.
c. If there is no user history, there is an anomaly to show which item to
show to user.
Kshitiz Basnet
17031231 7
CU6051NA Artificial Intelligence
2.2.1 System 1
Features of System
Kshitiz Basnet
17031231 8
CU6051NA Artificial Intelligence
2.2.2 System 2
Prateek Sappadla
Yash Sadhwani
Pranit Arora
Features of System
Kshitiz Basnet
17031231 9
CU6051NA Artificial Intelligence
2.2.3 System 3
Vishwa Gosalia
Bhavesh Chatnani
Aman Gupta
Pranal Soni
Features of System
Kshitiz Basnet
17031231 10
CU6051NA Artificial Intelligence
3 Solution
3.1 Proposed solution
The solution for the problem domain described in the introduction is by using machine
learning to create a content based recommender system. The working of the solution
from user’s perspective is explained by an example below:
Suppose a user has to be recommended a movie. The user will be shown the list of all
the movies from the dataset. The system asks the user to input the name of the movie
which is on the dataset. Then the user is asked to rate the movie. Based on that input
the system recommends the movies which are similar to the movie. The user can input
the movies and rate them for better recommendation.
The programming language which will be used to create the system will be python. The
dataset which will be used will be IMDB movie data set.
Flow of solution
The solution is created by doing the works as shown in these steps shown below:
Kshitiz Basnet
17031231 11
CU6051NA Artificial Intelligence
3.2 AI Algorithm
The algorithm used in the solution is K-Nearest Neighbor. This is used to group the array of
items based on the cosine similarity of items
3.1. Calculate the distance between the query example and the current example
from the data.
3.2. Sort the data and distance in ascending order based on distance between
points.
Step 8. End
(Harrison, 2018)
Kshitiz Basnet
17031231 12
CU6051NA Artificial Intelligence
Import pandas as pd
Import numpy as np
import CountVetorizer
df=pd.read_csv(“name of dataset”)
features=list[column_name]
df[‘feature’]= df[‘feature’].fill(“”)
function combinefeatures(row):
df[‘combinefeatures’]=df.individual_row
countmatrix=countvectorizor().fit_transform(df[‘combinefeatures’])
cosine_sim=cosine_similarity(countmatrix)
Print movie
If exit
End
Kshitiz Basnet
17031231 13
CU6051NA Artificial Intelligence
3.4 Diagrams
3.4.1 Flowchart of the Solution
Kshitiz Basnet
17031231 14
CU6051NA Artificial Intelligence
Kshitiz Basnet
17031231 15
CU6051NA Artificial Intelligence
4 Conclusion
Artificial Intelligence is the innovation of today. It can be used to make solutions which
make our work easier, faster and reliable. The solution that has been chosen is Movie
recommendation system. This solution can be implemented in the solving real world
problems. This project can help both developers who are willing to build similar projects
and the users who want the relevant movies.
First of all, movie recommendation system as AI topic for the coursework and it was
approved by the module leader. The conceptual solution required research on many AI
topics like machine learning, use of machine learning to create a recommendation system
through various websites, books, journals and academic reports. The machine learning
procedure was chosen create a recommendation engine. Therefore, the research on
Machine learning was a crucial part. It was done by reading blogs, watching videos,
reading reports and reading books related to machine learning. The recommendation
system could be made by using any approaches. For choosing a suitable approach in
creating a recommendation system a lot of research on academic reports, books, journals
etc. was done. Then, academic reports and journals which published the solutions
recommendation engine were read and understood. This made it clear that content based
recommendation system will be the solution to the problem domain. Finally, the report
writing process was carried out. The algorithm, flowchart and pseudo-code of the
program was written at the end of report.
Kshitiz Basnet
17031231 16
CU6051NA Artificial Intelligence
The solution has many applications in the real world. In the movie industry, it can have
a significant use as both the movie providers and the users can largely benefit from it as
users get relevant movies and the movie provider can get more users by implementing
this feature. The developers can create similar systems like product recommendation
system, food recommendation system etc. taking the help from this system.
The primary work that is need to be done is implementing the solution to make a program
which can recommend the user similar list of movies. It will be done by creating the
supervised machine learning model. This will predict what the movie will be
recommended to the users. Then, training and testing points will be created which will
be used to train and validate the model created above respectively. This will create a very
effective application. If possible, new features will be added to the solution to increase
its usability and reliability.
Kshitiz Basnet
17031231 17
CU6051NA Artificial Intelligence
5 Bibliography
Bullok, M. (2019) Artificial General Intelligence in plain English [Online]. Available from:
https://towardsdatascience.com/artificial-general-intelligence-in-plain-english-e8f6e9a56555
[Accessed 5 January 2020].
Childs, M. (2011) John McCarthy: Computer scientist known as the father of AI [Online].
Available from: https://www.independent.co.uk/news/obituaries/john-mccarthy-computer-
scientist-known-as-the-father-of-ai-6255307.html [Accessed 3 January 2020].
Davis, S. (2017) 28 Artificial Intelligence Terms You Need to Know [Online]. Available from:
https://dzone.com/articles/ai-glossary [Accessed 3 January 2020].
Gosalia, V., Chatnani, , Gupta, & Soni,. (2018) Movie Recommendation System. International
Research Journal of Engineering and Technology, 5(2), p.2.
Harrison, O. (2018) Machine Learning Basics with the K-Nearest Neighbors Algorithm
[Online]. (2) Available from: https://towardsdatascience.com/machine-learning-basics-with-
the-k-nearest-neighbors-algorithm-6a6e71d01761 [Accessed 9 January 2020].
Kshitiz Basnet
17031231 18
CU6051NA Artificial Intelligence
https://hackernoon.com/introduction-to-recommender-system-part-1-collaborative-filtering-
singular-value-decomposition-44c9659c5e75 [Accessed 8 January 2020].
Huertas, A., Pérez, G., Perez, M. & Clemente, F.J.G. (2015) Design of a Recommender System
Based on Users’ Behavior and Collaborative Location and Tracking. Journal of Computational
Science., 12(10.1016), pp.83-94.
Kanakiya , B. & Gangwar, A. (2020) Introduction to Deep Learning [Online]. Available from:
https://www.geeksforgeeks.org/introduction-deep-learning/ [Accessed 7 January 2020].
Lateef, Z. (2019) Types Of Artificial Intelligence You Should Know [Online]. Available from:
https://www.edureka.co/blog/types-of-artificial-intelligence/ [Accessed 5 January 2020].
next. (2020) What is Artificial Intelligence in the Energy Industry ? [Online]. Available from:
https://www.next-kraftwerke.com/knowledge/artificial-intelligence [Accessed 2 January
2020].
Osiński, & Budek,. (2018) What is reinforcement learning? [Online]. Available from:
https://deepsense.ai/what-is-reinforcement-learning-the-complete-guide/ [Accessed 7 January
2020].
Prabhakaran, S. (2018) Cosine Similarity – Understanding the math and how it works (with
python codes) [Online]. (1) Available from: https://www.machinelearningplus.com/nlp/cosine-
similarity/ [Accessed 9 January 2020].
Sappadla, P., Sadhwani, & Arora,. (2017) Movie Recommender System. Project Work. New
York: Semantic Scholar New York University.
Kshitiz Basnet
17031231 19
CU6051NA Artificial Intelligence
Sridhar, G.S. (2018) Introduction to Ai. In G.S. Sridhar, ed. Artificial Intelligence (Way to
future). G.S. Sridhar. pp.0-1.
Utermohlen, K. (2018) 15 Artificial Intelligence (AI) Stats You Need to Know in 2018 [Online].
Available from: https://towardsdatascience.com/15-artificial-intelligence-ai-stats-you-need-
to-know-in-2018-b6c5eac958e5 [Accessed 3 January 2020].
Watson, A. (2019) Global box office revenue from 2005 to 2018 [Online]. Available from:
https://www.statista.com/statistics/271856/global-box-office-revenue/ [Accessed 7 January
2020].
Kshitiz Basnet
17031231 20
CU6051NA Artificial Intelligence
6 Appendix
6.1 History of AI
6.2 AI Today
Kshitiz Basnet
17031231 21
CU6051NA Artificial Intelligence
i. Artificial Narrow Intelligence: This stage of AI is known as weak AI. The machines of
this stage can perform the tasks which hare simple and defined narrowly. The machine
does not have a thinking ability. The user defines the function and the system uses the
function to do some tasks. The examples are mobile assistant like Alexa, self-driving
cars, robots etc. All the systems made till date are categorized as Weak AI. (Lateef,
2019)
ii. Artificial General Intelligence: This stage is known as strong AI. The machines of this
stage can have the capability of learning anything and performing anything on its own.
The machines of this stage have a capacity of thinking capacity like humans and
working as humans do. These machines are the machines of future. (Bullok, 2019)
iii. Artificial Super Intelligence: This stage can be known as super strong AI. The machines
of this stage can have cognitive ability to surpass humans. These AI machines would
be better than humans in every aspects. They are also the machines of future.
(Techopedia, 2020)
Kshitiz Basnet
17031231 22
CU6051NA Artificial Intelligence
(Gahukar, 2018)
6.5 AI concepts
Artificial Intelligence is a very board term for defining intelligent machines, intelligent
software and intelligent systems. But, every Artificial intelligence is based on the
concepts which are as follows:
i. Machine Learning
ii. Deep Learning
iii. Natural Language Processing
iv. Robotics
v. Computer Vision
vi. Expert Systems
Kshitiz Basnet
17031231 23
CU6051NA Artificial Intelligence
Cosine similarity is a measure of similarity between two non-zero vectors of an inner product
space that measures the cosine of the angle between them. It is derived from Euclidean dot
product formula:
(Prabhakaran, 2018)
Kshitiz Basnet
17031231 24