# Dirichlet Matrix Factorization: A Reliable Classification-Based Recommender System
## 2 Proposed Model
### Running Example
The hyperparameters derived by this optimization method for each baseline and dataset are listed in Table 6.  
Additionally, we set the DirMF method to work with the logistic activation function \(\omega(x)=(1+e^{-x})^{-1}\). As shape parameters for the softmax function we took \(\beta_{u,i}=R_{u,i}\). Notice that this choice allows the system to straighten the most relevant votes (those with \(R_{u,i}\) high) using a more spiky softmax function, compared to the less relevant votes (those with \(R_{u,i}\) small) for which the softmax function used is flatter. To assess the quality of the predictions and recommendations provided by a RS based on CF we define Mean Absolute Error (MAE) (Equation (6)) as the mean absolute difference between the test ratings (\(R_{u,i}\)) and their predictions (\(\hat{R}_{u,i}\)), and coverage (Equation (7)) as the proportion of test ratings that CF can predict (\(\hat{R}_{u,i}\
eq\bullet\)) with respect to the total number of test ratings. Here, \(R^{\text{test}}\) is the set of pairs \((u,i)\) of user \(u\) and item \(i\) in the test split of the dataset, and \(\#R^{\text{test}}\) denotes its cardinality. \[\text{MAE}=\frac{1}{\#R^{\text{test}}}\sum_{(u,i)\in R^{\text{test}}}|R_{u,i} -\hat{R}_{u,i}|. \tag{6}\]  
\[\text{coverage}=\frac{\#\{\langle u,i\rangle\in R^{\text{test}}|\hat{R}_{u,i} \
eq\bullet\}}{\#R^{\text{test}}}. \tag{7}\]  
Furthermore, two adapted quality measures emerge by fixing a number \(n>0\) of top recommendations to consider: precision is defined as the averaged ratio of successful recommendations that are included in the top \(n\) recommendations for the user \(u\), \(T_{u}^{n}\), with respect to the size \(n\) of the recommendation list (Equation (8)); recall is the averaged proportion of successful recommendations included in the recommendation list of user \(u\), \(T_{u}^{n}\), with respect to the total number of test items that user \(u\) likes (Equation (9)). \[\text{precision}=\frac{1}{N}\sum_{u=1}^{N}\frac{\{i\in T_{u}^{n}|R_{u,i}\geq \theta\}}{\#T_{u}^{n}}. \tag{8}\] \begin{table}
\begin{tabular}{l l l l l} \hline \hline
**Method** & **MovieLens** & **FilmTrust** & **MyAnimeList** & **Netflix** \\ \hline \multirow{2}{*}{PMF} & factors = 8, \(\gamma=0.01\), & factors = 4, & factors = 10, & factors = 8, \(\gamma=0.01\), \\  & \(\lambda=0.045\) & \(\gamma=0.015\), \(\lambda=0.1\) & \(\gamma=0.005\), \(\lambda=0.085\) & \(\lambda=0.06\) \\ \hline \multirow{2}{*}{NCF} & factors = 5, & factors = 5, & factors = 7, & factors = 6, \\  & epochs = 10 & epochs = 8 & epochs = 15 & epochs = 4 \\ \hline \multirow{2}{*}{GMF} & factors = 5, & factors = 5, & factors = 7, & factors = 5, \\  & epochs = 10 & epochs = 15 & epochs = 20 & epochs = 4 \\ \hline \multirow{2}{*}{BeMF} & factors = 2, & factors = 2, \(\gamma=0.02\), & factors = 4, & factors = 6, \\  & \(\gamma=0.006\), \(\lambda=0.16\), & \(\lambda=0.06\), \(m=75\) & \(\gamma=0.004\), \(\lambda=0.1\), & \(\gamma=0.0006\), \(\lambda=0.02\), \\  & \(m=100\) & & \(m=100\) & \(m=50\) \\ \hline \multirow{2}{*}{DirMF} & factors = 6, \(\gamma=0.01\), & factors = 8, & factors = 10, & factors = 10, \\  & \(\gamma=0.022\), \(m=50\) & \(\gamma=0.015\), \(m=100\) & \(\gamma=0.02\), \(\eta=0.01\), & \(\gamma=0.02\), \(\lambda=0.02\), \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Baseline hyperparameters obtained by grid search optimization. \[\text{recall}=\frac{1}{N}\sum_{u=1}^{N}\frac{\{i\in T_{u}^{u}|R_{u,i}\geq\theta\}}{ \{i\in R_{u}^{\text{test}}|R_{u,i}\geq\theta\}}. \tag{9}\]  
Here, the variable \(u\) runs over the users of the dataset, \(N\) is the total number of users, \(R_{u}^{\text{test}}\) is the collection of items rated by user \(u\) in the test split and \(\theta\) is a threshold to discern whether a user likes an item (\(R_{u,i}\geq\theta\)) or not (\(R_{u,i}<\theta\)).