## 3 Modeling the Time Effect on Music Recommendations
### Time-Aware Music Recommendation Method
#### 3.2.1 Modeling the Evolution of Preferences
To compute them, it is necessary to define other variables: true positives (\(TP\)s) are positive instances correctly classified; false positives (\(FP\)s) are negative instances classified as positive; true negatives (\(TN\)s) are negative instances correctly classified; false negatives (\(FN\)s) are positive instances classified as negative. \[TPR=TP/(TP+FN) \tag{21}\]

\[r_{i,j}=4\Bigg{(}1-\sum_{k=1}^{k-1}dPlayF_{k}(u_{i})\Bigg{)} \tag{13}\]0

The ROC (receiver operating characteristics) curve is the representation of the \(TPR\) against the \(FPR\) of classifiers induced by the same algorithm and from the same data but with different probability threshold settings. Point (0,0) of the ROC graph corresponds to a classifier that classifies all examples as negatives, and point (1,1) corresponds to a classifier that classifies all examples as positive. The best learning system will be the one that provides a set of classifiers with a greater area under the ROC curve (AUC). The larger the area, the more distant the ROC curve is from the line joining the two points, which represents the random classification. The NDCG is a measure based on the assumption that the lower the ranked position of a relevant item, the less useful it is for the user. When applying this metric, the gain is accumulated starting at the top of the ranking. The graded relevance value of items in lower positions is reduced in a quantitylogarithmically proportional to the position of the result. DCG is the discounted cumulative gain accumulated at a particular rank \(k\). \[r_{i,j}=4\Bigg{(}1-\sum_{k=1}^{k-1}dPlayF_{k}(u_{i})\Bigg{)} \tag{13}\]1

\[r_{i,j}=4\Bigg{(}1-\sum_{k=1}^{k-1}dPlayF_{k}(u_{i})\Bigg{)} \tag{13}\]2

where \(|REL|\) is the number of the best ratings up to position \(k\). \[r_{i,j}=4\Bigg{(}1-\sum_{k=1}^{k-1}dPlayF_{k}(u_{i})\Bigg{)} \tag{13}\]3

The MAP is the average of the precision value obtained from all users and items in the top-N lists, where prec@K is the proportion of recommended items in the top-k set that are relevant. Since the rank-based metrics for validating top-N recommendations are referred to a list with a given size (N), the relevant items are the N items with the highest implicit rating values in the test set. The top-N lists generated from the predicted ratings will contain a proportion of such relevant items and that value constitutes the precision of each list. ### Baseline Methods

The baseline methods used in the comparative study belong to the two most used categories in the field of recommender systems: memory-based methods and matrix factorization. The former usually give very good results when there are no sparsity problems while matrix factorization methods, although they are also affected by the dispersion, usually perform better with sparser data. High degrees of dispersion generally occur when users have to explicitly express their preferences, as in such cases the number of ratings for the products to be recommended is usually small. In this work, the proposal to calculate the ratings from the plays of songs allows for a greater number of ratings and minimizes the sparsity problem. In this scenario, it is difficult to predict which approach will provide better results. In any case, our aim is not to compare these methods but to prove that, on the one hand, they perform better with decay ratings than with ratings, and, on the other hand, that our proposal of incorporating user listening behaviors outperforms all the baseline models. The specific methods tested for rating predictions were the user-based K-nearest neighbor (K-NN), matrix factorization (MF), biased matrix factorization (BMF) [79] and factor wise matrix factorization (FWMF) [80]. K-NN was tested using both the cosine similarity and Pearson correlation coefficient. The implementation of those algorithms provided by the RapidMiner tool ([[https://rapidminer.com](https://rapidminer.com)]([https://rapidminer.com](https://rapidminer.com))) were used. The number of k neighbors was set to 15, since higher values do not improve the results.