# A Survey of Sequential Pattern Based E-Commerce Recommendation Systems
## 1 Introduction
### Reasons for Sequential Pattern Mining in E-Commerce Recommendation  
1. User-Item Interactions Are Sequentially Dependent: in E-commerce recommendation systems, the crucial task is to identify the next purchase items from customer purchase behaviors [26]. This has essentially led to the development of sequential pattern-based recommendation systems. These systems suggest items that may be of interest to a user by mainly modelling the sequential dependencies over the user-item interactions in a sequence [27], possibly through mining of sequential patterns [6]. 2. Improve the Quality and Quantity of Ratings: recommendation systems in E-commerce suffer from uninformative rating data, which usually only represent whether a user has purchased a product before. This user-item rating matrix is usually sparse, less informative, and leads to poor recommendations [28]. In these systems, even active customers may have purchased only under 1% of the products (1% of 2 million products in an E-Commerce store such as Amazon.com is 20,000), i.e., often only a few of the total number of items available in a database are rated by users [29]. Thus, in order to capture more real-life customer purchase behavior and provide the relationship between already purchased items and recommended items, the historical sequential purchase patterns of a user can be analyzed and integrated into the user-item matrix input to enhance and improve the rating quality and quantity by providing the possible values for missing/unrated items. To demonstrate this, consider the historical purchase data in Table 7.  
Step 1: Create a user-item purchase frequency matrix (Table 8) from the historical purchase data (Table 7), where the values indicate the number of times an item was purchased by a user. For example, User 1 purchased butter twice, Honey once, etc. Step 2: Now, convert the historical purchase data (Table 7) to a sequential database (Table 9) by considering the period of time (day, week, and month) of the purchase. Step 3: Create frequent sequential purchase patterns from the sequential database (Table 9) using any SPM algorithm, such as GSP [5], and extract the possible purchase sequential rules (Table 10) from frequent purchase sequences. Using these sequential purchase rules, the unknown ratings in the user-item purchase frequency matrix (e.g., the value of User 1 for the item Cheese in Table 8) can be filled using a predicted value such that all users who have purchased the antecedent items such as (Milk, Butter) from Rule No. 1 of Table 10 have a higher chance (say, 0.5 or a more specific determined chance value for the highly probable purchases determined by the SPs) of purchasing Cheese next. Hence, using Rule No. 1 it can be inferred that as User 1 purchased Milk and Butter in this transaction, there is a high chance that they would purchase Cheese in the same transaction. Hence, we assign a value of 0.5 to the user-item combination (User 1-Cheese). Similarly, (User 2-Cream) is filled using Rule No. 3 and (User 2-Milk) is filled using Rule No. 2. Step 4: The final enriched user-item frequency matrix created with help of the sequential rules as described above is shown in Table 11. \begin{table}
\begin{tabular}{c c c} \hline
**CustomerID** & **PurchasedItems** & **Timestamp** \\ \hline User1 & Cream, Butter, Milk & 2017.06.05 13:38:00 \\ \hline User1 & Honey, Butter & 2017.06.06 09:40:20 \\ \hline User2 & Butter, Cheese & 2017.06.05 19:40:16 \\ \hline User 2 & Cheese, Honey & 2017.06.06 10:40:16 \\ \hline \end{tabular}
\end{table} 
Table 7: Historical purchase data. \begin{table}
\begin{tabular}{c c c c c c} \hline
**User/Item** & **Milk** & **Bread** & **Butter** & **Cream** & **Cheese** & **Honey** \\ \hline User 1 & 1 & 0 & 1 & 1 & 0 & 1 \\ \hline User 2 &? &? & 1 &? & 2 & 1 \\ \hline \end{tabular}
\end{table} 
Table 8: User–item frequency matrix from historical purchase data.