AI Coursework
AI Coursework
CU6051NT Artificial
Intelligence
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 will be
awarded.
Abstract
Because of the rapid expansion of the internet and social media in recent years.
Because of its ability to provide improved products, a product recommendation is vital
in our social lives. Users can be recommended a set of products based on their
interests or the popularity of the products. Even though several product
recommendation systems have been presented, most of them either cannot
recommend a product to existing users efficiently or cannot recommend a product to a
new user at all. We offer a product recommendation system in this research that can
recommend products to both new and existing users.
1. Introduction
Artificial intelligence
Building intelligent computers that can carry out tasks that traditionally require human intelligence
is the goal of artificial intelligence (AI), a broad field of computer science. Machine intelligence is
referred to as artificial intelligence. Artificial intelligence has risen to prominence in the modern
world. Computers that have been taught to recognize and imitate human behavior are simulating
human intelligence. These machines are capable of making mistakes and growing from them to
perform things that humans do. As artificial intelligence (AI) advances, it will significantly affect
our quality of life. Everyone today wants to interact with AI technology in some capacity, whether
as a consumer or as a professional working in the industry.
The phrase is frequently used to describe a project that aims to develop systems with
intellectual capabilities similar to those of humans, including the capacity for reasoning,
decoding meaning, generalizing, and learning from prior experiences. It has been
demonstrated that computers may be programmed to easily accomplish exceedingly
hard tasks, such as discovering proofs for mathematical theorems or playing chess,
since the introduction of the digital computer in the 1940s. Although computer
processing speed and memory capacity continue to rise, no program has yet been able
to match human adaptability in broader sectors or in tasks requiring a significant
amount of common knowledge. [ CITATION WEr20 \l 1033 ]
1
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
Machine learning
2
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
Recommendation systems have been built using artificial intelligence (AI), notably
computer intelligence and machine learning methodologies and algorithms, to increase
prediction accuracy and address data sparsity and cold start issues. It extensively
examines a variety of AI-related recommender system-related challenges and
examines how these systems have been improved by applying techniques including
fuzzy techniques, transfer learning, genetic algorithms, evolutionary algorithms, neural
networks and deep learning, and active learning. [ CITATION Rog19 \l 1033 ]
Offering goods and services that specifically address the demands of a specific
customer is difficult for businesses in a competitive market. By helping to address a
significant issue—information overload—personalized e-services improve user
experience and make it easier for customers to make decisions. The recommender
systems used in these customized e-services were developed twenty years ago
employing methods and theories from several artificial intelligence (AI) disciplines for
locating user profiles and preferences.
Recently, several AI techniques have been used to recommender systems, which has improved
user pleasure and experience. A higher standard of suggestion is possible using AI than with
conventional techniques. A new age for recommender systems has begun as a result of this,
enabling deeper insights into user-item relationships, the presentation of more complex data
representations, and the discovery of thorough information in demographical, textual, virtual, and
contextual data.
3
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
The recommendation engine can be used to increase earnings, sales, and revenues in
general. It is a great marketing tool, especially for e-commerce. With eleven additional
studies demonstrating the benefit of recommendation engines in the e-commerce
industry, it is no wonder that customized product recommendations are so well-liked in
the retail industry. A recommendation engine is a system for filtering information that
uploads data in accordance with users' choices, interests, or past behavior related to
an item. Based on their profile, it can predict a user's interest in a given item. Thanks to
product suggestion algorithms, customers may quickly and simply find what they're
looking for. Few recommendation systems have been created thus far to find items that
the user has already viewed, purchased, or in some other manner interacted with. A
recommendation system must be flexible enough to change as user behavior does. It
must to be able to function in a dynamic environment, giving users timely notice of
promotional offers, assortment adjustments, and price changes. [ CITATION FOI15 \l
1033 ]
Algorithms used in recommendation systems typically rely on past purchases and page
visits. As a result of using artificial intelligence to analyze user interactions and select
aesthetically appealing products that will appeal to any specific customer, many firms
now provide real-time suggestions. Artificial intelligence is used by recommendation
engines to provide quick, precise recommendations that are tailored to the needs and
preferences of each consumer.
4
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
2. Background
The recommender system filters the most crucial information from a large quantity of data using
the user's data as well as additional factors like the user's preferences and interests. In order to
provide recommendations, it evaluates the user and object's compatibility as well as their shared
characteristics.
5
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
ii. help product suppliers distribute their goods to the right customers
iii. Products that are most pertinent to users can be found by users.
6
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
Collaborative filtering requires a list of items depending on the user's prior selections.
This system only requires a few product characteristics to work. Each object and user
have a unique embedding or feature vector that describes them both and sinks them in
the same embedding location. It creates enclosures for users and goods on its own.
Based on the users' locations, collaborative filtering suggests well-known, interesting,
or well-liked content. As the population grows more diversified, the published tales will
reflect a greater level of public interest. Another illustration of collaborative filtering in
action is Wikipedia. Collaborative filtering does not require content extraction or
analysis. People will be able to properly assess information when compared to
counting functions. Multimedia or complex objects, such music, movies, and images,
start to work properly. [ CITATION Tua21 \l 1033 ]
7
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
The use of friends' suggestions is also very common on social networking sites. A
highly helpful feature on Facebook, for instance, is the People you may know section,
which presents a list of people who can be joined as friends. According to this method,
if you are friends with the 10th out of the 11th densely associated persons, you must
be friends with the 11th. This method educates and calculates missing edges based on
social connection data. Social connections are made via collaborative filtering
algorithms.
Let's examine another situation. Amshu and Sailesh both like to play the same games.
Nikki like playing it and using it. Amshu hasn't played that game yet, but the algorithm
has determined that Amshu and Sailesh have a similar interest, so it recommends that
Sailesh play it. Recommender systems are capable of collaborative filtering using the
same product. The other buyer will also find the item appealing. [ CITATION MDE11 \l
8
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
1033 ]
9
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
Memory-based methods make use of the data you already have (likes, votes, clicks, etc.) to create
correlations (similarities) between individuals (Collaborative Filtering) or items (Content-Based
Recommendation) in order to suggest an item, I to a user u who hasn't seen it before. In the case
of collaborative filtering, we obtain recommendations from items seen by users nearby you, hence
the phrase collaborative. The goal of content-based recommendation, on the other hand, is to offer
similar new products by comparing items based on their features (e.g., movie genre, actors, book
publisher or author, etc.). Simple similarity measurements (Cosine similarity, Pearson correlation,
Jaccard coefficient, etc.) are frequently used in memory-based systems to group similar individuals
or objects together. Memory-based algorithms use similarity measurements on two vectors (rows
or columns) of such a matrix to obtain a number reflecting similarity when there are users on one
dimension and things on the other, with the cells carrying votes or likes.
There are two types of Memory based algorithm. They are:
10
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
On the other hand, model-based approaches try to complete the gaps in this matrix.
They take on the issue of "predicting" a user's level of interest in something they
haven't before seen. They achieve this by training a model that can predict the user's
rating for a new item that has just been added to the system using a number of
machine learning techniques on a user's vector of objects. In this approach, models
are built utilizing various data mining and machine learning algorithms to predict user
ratings of unrated items. There are numerous model-based collaborative filtering
methods available. The Bayesian network, the Baye Latent semantic models,
clustering models, and singular value decomposition Latent Dirichlet Models of
Allocation, Markov decision-making, and multiple multiplication factor are examples of
probabilistic latent semantic analysis.
Clustering based
11
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
12
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
1. Facebook
13
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
Social networking, which aims to connect individuals from all over the world, was invented by
Facebook, a social networking site, in 2004. The social networking site Facebook, which is
presently run by Mark Zuckerberg, uses a number of AI techniques to improve it. On the other side,
one of the most amazing tactics this social media juggernaut does is collaborative filtering.
"Facebook uses a variety of recommender systems for different sections of the website. To give
information it believes will be helpful to the user, one algorithm, for instance, might be utilized in the
user timeline while other recommender systems are used in the News and Marketplace areas.
Collaborative Filtering is therefore utilized by Facebook.
2. Amazon
When Amazon was first established in 1994, it only sold books. Amazon incorporates a
variety of the leading machine learning techniques, including collaborative filtering, into its
recommendation engine for greater performance and increased user engagement. To further
provide high-quality recommendations, our platform chooses item-based collaborative filtering
over a user-based strategy. Item-based collaborative filtering on the platform has generally
proven to be a successful strategy that has boosted the company's prospects for financial
success. Collaborative filtering initially only used one method, a user-based method.
However, Amazon was the one to create an item-based strategy that started to focus on
things rather than users.
3. Solution
14
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
system in this framework. Any good or service has a stickiness element that makes
people want to buy it. Its proprietary algorithms are made to foresee a user's interest,
recommend various items to the user in a variety of ways, and maintain that interest
throughout.
15
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
3.2. Algorithm
It was created and initially used by Amazon in 1998. Instead of connecting the user to
similar consumers, item-to-item collaborative filtering links every item the user has
purchased and rated to related items before combining those related products into a
recommendation list. The initial stage in creating the model is to identify similarities
between each pair of items. There are various methods for determining how similar two
item pairs are. Utilizing cosine similarity is one of the most widely used techniques.
16
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
dataset. Using a variety of similarity tests, these similarity values are then used to estimate the
user-item pair scores. By examining every object, the degree of similarity is calculated. The
ratings that people who rated both products gave each one determines how comparable the two
items are. [ CITATION Sau21 \l 1033 ]
17
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
18
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
19
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
The first stage in creating the model is determining which item pairs are
comparable to one another. There are various methods for determining how
similar two item pairs are. Utilizing cosine similarity is one of the most widely
used techniques.
Prediction Computation
Executing a recommendation system is the second stage. It generates ratings using the items
(already evaluated by the user) that are most comparable to the missing item. We therefore
attempt to produce predictions based on the reviews of comparable products. We calculate this
using a technique that uses the weighted sum of the ratings of other comparable products to
determine the rating for a specific item.
20
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
(Item 1, Item 2), (Item 1, Item 3), and (Item 2, Item 3) are the item pairings. picking out
each item to pair one at a time. Then, we locate every user who has given ratings for
both items in the item pair. Using the aforementioned cosine calculation, determine
calculating the similarity between the two items using the cosine formula as stated
In the table, we can see only User_1 and User_2 have rated for both items 1 and 2.
I2 = 2U2 + 3U3
21
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
In the table we can see only User_3 and User_4 have rated for both the items 1 and 2.
22
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
I3 = 1U3 + 2U4
In the table we can see only User_1 and User_3 have rated for both the items 1 and 2.
I3 = 3U1 + 1U3
Now, in this step we calculate the ratings that are missing items in the
table.
23
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
Therefore, the ratings that are missing in the table of U1I2 is 2.49, U2I3 is 3.43 and
U4I1 is 2.0
3.3. Pseudocode
24
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
One approach to creating or planning a program is pseudocode. Pseudocode is false code since
pseudo means false. The words phony or imitation would be a better translation. False
Pseudocode (not the real thing). Although it mimics or appears like genuine code, it is not. It
explains the goals of a program using English statements. Because there is no compiler that can
convert pseudocode to any machine language, it is fictitious. Pseudocode is used to record the
design of a program or module (also known as the algorithm). (Busbee, 2018)
The team of designers and programmers can review pseudocode to make sure that actual
programming is likely to adhere to design standards because it is thorough yet comprehensible.
Finding faults early in the development process is less expensive than doing it later. The
acceptable pseudocode is then recast in a programming language's vocabulary and grammar.
Sometimes approaches based on computer-aided software engineering are combined with
pseudocode. (Admin, 2005)
25
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
START
IMPORT System
IMPORT NumPy
IMPORT library
READ dataset
PROCESS dataset
DEFINE Similarity
EXTRACT Similarity
EXECUTE
26
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
27
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
3.4. Flowchart
A flowchart is a diagram that shows the actions, choices, and sequences of a workflow or process.
A basic flowchart is the most basic type of a process map, even though there are many distinct
forms of flowcharts. It is a potent tool that may be applied to many different fields for process
planning, visualization, documentation, and improvement. (Asana, 2022)
28
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
29
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
30
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
31
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
I. User-based
The collaborative filtering can be adapted with neighborhood
methods, whose focus is on relationship between the items or,
alternatively, between the users. They are:
I. User-based
32
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
User-based
33
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
34
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
4. Conclusion
The algorithm used to produce the project had a variety of benefits and drawbacks.
Due to collaborative filtering, the content of the items, such as the type or genre of the
film, may not always tell the entire story. We can predict the item rating even in the
absence of any knowledge about the item and without if the consumer will purchase it.
Collaborative filtering is the application where the recommendation algorithm shines.
35
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
As internet users, we all interact with product suggestion algorithms practically every day through
Google searches, music or movie streaming services, online purchasing, social media reading, and
dating apps.
Product recommendation systems have become one of the most popular and effective machine
learning applications in the business world as a result. Recent research from Monette shows that
product recommendations can increase purchase rates by 70%, both in the initial session and in
following sessions, as well as average order values by 33%. According to a Salesforce study,
customers who click on product recommendations had 4.5x higher basket rates, 4.8x more product
views per visit, and a 5x higher per-visit expenditure.
Platforms for e-commerce use collaborative filtering. A consumer might get product
recommendations that are catered to their preferences when exploring products on an e-commerce
website like Amazon, for instance. This can help buyers choose the right product and make
informed decisions about it. Additionally, e-commerce companies profit from the suggestion system
because it allows them to consistently boost their sales by a sizeable amount. When a consumer
receives a recommended item, they are likely to choose and purchase it, providing a way to boost
the profit of an unbalanced business.
36
20048503 Shailesh
Bhattarai
CS6P05NT ARTIFICAL INTELLIGENCE
The next step is to put the research findings into practice after it has been thoroughly researched
and documented. To do this, a dataset must first be imported into the application. The project's
research has already been finished, and work on the development phase has begun.
37
20048503 Shailesh
Bhattarai