# Enhancing Sequence Movie Recommendation System Using Deep Learning and KMeans
## 4 Experimental Study
### Results Analysis  
This subsection explains the result of our proposed system during the experiment using the performance metrics across two Movielens datasets, 100 K and 1 M. We evaluated the performance of our algorithm using common Top-N evaluation metrics, HitRat@K and NDCG@K, highlighting its effectiveness in providing accurate and relevant recommendations. Firstly, we compared our transformer model training with a non-sequence model such as BPR, NeuMF, and sequence models including GRU4 Rec, Caser, and SASRec. The non-sequence model only suggests movies to the user, without explicitly considering the sequential order of their preferences or viewing history, and ignores temporal information. The sequence model considers the temporal order or sequence of a user's interactions with the recommender. The user's behavior sequence information can effectively characterize the user's changing preferences to a certain extent, improve the recommendation performance on sparse datasets, and learn the long-term dependencies. In Table 3, our transformer model is shown to achieve the best HitRat@5, HitRat@10, NDCG@5, and NDCG@10 results on all datasets compared to the BPR, NeuMF, GRU4 Rec, Caser, and SASRec models. The experimental results were HitRat@5, HitRat@10, NDCG@5, and NDCG@10 at (0.5676, 0.6633, 0.3714, 0.3783) on 100 K and (0.7034, 0.7309, 0.5869, 0.6238) on 1 M. This indicated that the sequential movie recommendation system of our proposed transformer architect could effectively extract useful information from movies to help us automatically select information with a long-term dependency and achieve a more accurate predicted rating of next target movies than other models. Furthermore, our approach conveys the effectiveness of utilizing the multi-head attention mechanism to capture relevant information in different representation subspaces for different tasks and is time-consuming. The mechanism only pays attention to important movies. It drowns out irrelevant movies for recommendation. Figures 3 and 4 show our analysis of the latent dimensionality hyperparameter, highlighting the significance of higher latent dimensions d in achieving optimal results, ranging from 5 to 50, across metrics with k values 5 and 10 of HitRate and NDCG to understand the impact on algorithm performance. In this illustration, we study models such as BPR, NeuFM, GRU4 Rec, Caser, SasRec, and our model, with various d values, which increased its value in both datasets. Moreover, our proposed model's performance steadily improved the embedding dimensions increased from 20 to 50. This indicated the best performance, with the model learning more efficiently when a larger d was used to solve overfitting. Overall, for sparse datasets, the larger the embedding dimension, the better the performance that can be achieved. This variation has a relatively stronger effect on 1 M than 100 K. A higher HitRate@10 value indicates a greater number of relevant results, making the model more effective in suggesting the next_target movie. The performance evaluation of our movie recommendation system was carried out after utilizing the transformer model integrated K-means. Table 4 demonstrates effectiveness in enhancing recommendation quality and diversity. On the MovieLens 100 K dataset, our model achieved an RMSE of 1.0756, MAE of 0.8741, precision of 0.5516, recall of 0.3260, F1-score of 0.4098, and item coverage of 0.1165. The intra-list diversity, when applied with K-means, was 0.2447, which is an improvement over the 0.2173 intra-list diversity in the non-K-means scenario. In contrast, in the larger 1 M dataset, performance was enhanced, as evidenced by the improved metrics: an RMSE of 0.9927, MAE of 0.8007, precision of 0.5838, recall of 0.4723, F1-score of 0.5222, and item coverage of 0.3216. The intra-list diversity for this dataset improved to 0.3007 with K-means, compared to 0.2878 without K-means. These outcomes illustrated the model's scalability and its enhanced ability to make more accurate predictions with larger datasets.