## 4 Proposed Optimized Graph-CNN-based Approach for Online Product Recommendation
### Problem Definition  
This project aims at recommending users with next most likely purchasable product to be clicked. Session-based recommendation aims to predict which item a user would like to click next, only based upon his/her current interaction sequence. A session is referred to a time period where a set of items (e.g., products in our scenario) are clicked or collected or visited by users. Session-based recommendation aims at predicting the future actions of a user in a given session. For example, by having some partial data related to a session (e.g., some history or pattern of clicks), session-based product recommendation system will recommend an item which a user will likely to click next.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Data** & **Description** & **Examples** \\ \hline acces\_ip & IP address of the user & 210.54.66.88 \\ access\_date & The date when user is active and browsing & 11/02/2020 \\ access\_time & The exact time when user clicked a product & 17:45:46 \\ access\_page & URL of the page where user is currently active & /shop/list.php?ca\_id=30 \\ item\_id & Unique identification number (ID) of the clicked item & 202020 \\ item\_name & Name of the clicked product & VERSAGE \\ Item\_type & Type of the product clicked & Purchased, clicked or visited \\ \hline \hline \end{tabular}
\end{table}
Table 1: Data Description and Examples.  
Here we give a formulation of the session-based recommendation problem as below.  
There are two important factors to be considered, the products and the order in which they are clicked. All the unique products in all sessions are represented in Equation (1):  
\[V=\{v1,\ v2,\ v3,\dots,\ v|V|\} \tag{1}\]  
Similarly, the order of their clicks is represented in time order as shown in Equation (2):  
\[C=\{c1,\ c2,\ c3,\dots,\ cn\} \tag{2}\]  
where \(cn\) is the latest clicked item and c1 is the very first item clicked by a user in a session. All the clicked items in Equation (1) belong to \(V\) which represents a particular item clicked by a user at a certain time. For example, if we have a clicked item in C named as \(ct\), it represents an item in \(V\) clicked by user at time \(t\). Therefore, the objective of our proposed model is to predict the next possible product click that is most likely to be purchased i.e., \(cn+1\). It can be formulated using Equation (3):  
\[Ct=\{\ c1,\ c2,\ c3,\dots,\ ct-1,\ ct\}(1\leq t<n)) \tag{3}\]  
Precisely, a ranked list of all the possible items that can be clicked and purchased by the user in a session is generated by the model. It shows that the output is the probability of a product to be purchased from the complete list of products in the dataset i.e., \(V\). Hence, we can say that:  
\[\hat{y}i=\{\hat{y}1,\ \hat{y}2,\ \hat{y}3,\dots,\ \hat{y}|V|\} \tag{4}\]  
where, \(\hat{y}i\) represents the recommendation score of products vi. As, the recommendation system usually aims at suggesting more than one product to the user therefore, we select top k products form Equation (4) for recommendation.  
Now, we express this problem in terms of graphs. First, we use the generic representation of a graph in terms of vertices and edges and define an attributed graph as shown in Equation (5):  
\[G=(V,\ E,\ X) \tag{5}\]  
where, \(V\) is the set of nodes and each node represents a unique product as shown in Equation (1). \(E\) is the set of edges between nodes i.e., clicks sequence or order between different products also shown in Equation (2). The attributed graph differs from the traditional graph as it includes an additional parameter as \(X\). \(X\) is the feature matrix that represents the features of all the products. Next, we build an adjacency matrix A which also represents the network topology. The entries in the adjacency matrix are either 0 or 1. If there is an edge between two products then the entry will be 1 otherwise it will be 0. The degree of all the nodes is represented in the degree matrix D.