## 3 Modeling the Time Effect on Music Recommendations
### Time-Aware Music Recommendation Method
#### 3.2.1 Modeling the Evolution of Preferences
Since the additional attribute used in the K-NN captures the time-dependent user listening behavior, the proposed method was named \"user-time K-NN\". #### 4.4.1 Rating Prediction

The user-time K-NN method, which incorporates the time variable, was tested for the complete day and the morning and evening intervals using classical ratings, as well as the decay ratings defined in this work, where \(\lambda\) was set to 0.4. Table 4 shows the RMSE, MAE and NMAE values obtained in the tests. As in the tables above, the values in bold represent the best results. Figure 7 presents a comparison of the error rates, the MAE and RMSE, of all methods tested in this study applied to the complete day dataset, as well as to the morning and evening intervals. The last bars of each group represent the results obtained using the user-time K-NN proposal. In all the time periods studied, the introduction of the new attribute, which captures the users' listening habits throughout the day, lead to lower error rates, as can be seen in the graphs. By comparing the results of the user-time K-NN with BMF, the second-best method, the reduction in the MAE is 2.2%, 1.8% and 0.3% for the complete day, morning and evening, respectively, when using ratings. In the case of the decay ratings, the reduction is 4.5%, 4.4% and 3.0%. Figure 6: Individual day time frequencies of plays for different users during the morning intervals. the rest of the cases (all methods for the morning period and K-NN Pearson, MF and BMF for the evening period) was smaller. However, all methods using decay ratings give lower error rates than the same method using ratings. Moreover, our proposal of using decay ratings and the time of day as an additional attribute (user-time K-NN method), was the approach that produced the lowest values of the MAE and RMSE. Specifically, the improvement in the MAE, compared to the BMF with ratings, was 26.0% for the complete day, 11.2% for the morning interval and 12.8% for the evening interval. #### 4.4.2 Top-N Recommendations

The effect of introducing the time of day attribute using the user-time K-NN method on top-N recommendations is analyzed in this section. Table 5 shows the AUC, NDCG and MAP obtained by applying that method for the three periods studied, both with the ratings and decay ratings since in both cases the results were the same. Figure 9 shows the values of these evaluation metrics, as well as prec@5, prec@10, prec@15 and MAP, obtained after applying the proposed user-time K-NN method and other top-N recommendation approaches, with both the ratings and decay ratings and considering the context of time of day. Figure 8: Comparison of the MAE and RMSE values obtained for the three periods studied using different methods. In the same way as applying the K-NN method without attributes, applying the user-time K-NN method produced the same results of the rank-based metrics for the ratings and decays ratings. This occurs even though the MAE and RMSE error rates were lower with the ratings than with the decay ratings. This was possible because the MAE and RMSE are based on the difference between predicted values and actual values, while the metrics used for top-N recommendations are based on the items included in the ranked lists and their ranks. After analyzing the top-N lists in detail we found few changes in their position, especially in the first elements. The NDCG is a metric not very sensitive to the rank-based metrics. This is because the MAE and RMSE errors are lower with the ratings than the decay ratings. This was possible because the MAE and RMSE are based on the difference between predicted values and actual values, while the metrics used for top-N recommendations are based on the items included in the ranked lists and their ranks. After analyzing the top-N lists in detail we found few changes in their position, especially in the first elements. The NDCG is a metric not very sensitive to the rank-based metrics.