# Recommendation System Using Autoencoders
## 4 Results and Discussion  
Figure 8 shows the performance of the model using the ML-1M dataset. In terms of loss and val_loss, they are decreasing over each epoch reaching a point where they begin to stabilize. There is no intersection of the loss curve with that of val_loss because when the dropout layer is added, it only acts on the training dataset, leading to the difference that can be observed between them. If this layer had not been added, the result would be an overfitted model as shown in Figure 9.  
Figure 10 shows the loss model of the ML-10M dataset. When analyzing the figure, we can observe a behavior similar to that of Figure 8, but the loss and val_loss present a lower value.  
Figure 11 demonstrates the growth of precision and recall values throughout each epoch. The accuracy/recall graph of the ML-10M dataset has a structure similar to that shown in figure below. It was considered a threshold of 0.6 for both metrics. With these values and those of RMSE presented in Table 3, it can be deduced that the model is having a good behavior towards the data, thus being able to provide recommendations, more accurate, that go against the interest of the user.  
Figure 8: Model loss autoencoder ML-1M.  
More layers were added to the autoencoder to check if the results could be better. In the experiment, only one layer was added and then, in a second phase, two layers were tested. The number of epochs and batch size remained the same and, with the exception of the number of neurons,  
Figure 11: Precision and Recall of ML-1M.  
Figure 9: Overfit of the model.  
all parameters maintained the same values. For each new layer, 1000 neurons were removed. Table 3 shows the results obtained.  
As we can analyze, with a greater number of layers in the autoencoder, for both datasets, the RMSE value tends to increase. Thus, it is not justified to consume more memory in order to use a greater number of layers if in the end we get a bigger error. Therefore, the choice of architecture presented in Figure 6.  
Table 4 shows the comparison of RMSE results between the created autoencoder model and the SVD. The SVD results were obtained using Surprise [52] and the same data treatment was performed.  
When analyzing these results, we can confirm that with the autoencoder we obtain better results compared to the SVD. Since the datasets are very sparse and we are using a collaborative filtering approach, we would expect problems to arise, but as we can see from the results, the autoencoder model has managed to overcome them. The fact that the RMSE decreases further in the ML-10 M suggests that the autoencoder had no difficulty in acting against a large set of data.  
To conclude this evaluation of the results, in Figure 12, 10 products are presented which the user has already evaluated with a high rating. These are displayed in order to have a short comparison with the 10 products suggested by the model, shown in Figure 13.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **RMSE** \\ \hline  & **ML-1M** & **ML-10M** \\ \hline
**SVD** & 0.184 & 0.176 \\ \hline
**Autoencoder** & 0.029 & 0.010 \\ \hline \hline \end{tabular}
\end{table}
Table 4: RMSE comparison of autoencoder and Singular Value Decomposition (SVD) model  
Figure 12: Ten reviews of products given by the user.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **RMSE** \\ \hline  & **ML-1M** & **ML-10M** \\ \hline
**1 Layer + 1 Latent\_Space** & 0.029 & 0.010 \\ \hline
**2 layers + 1 Latent\_Space** & 0.038 & 0.012 \\ \hline
**3 Layers + 1 Latent\_Space** & 0.050 & 0.015 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Comparison of Root Mean Square Error (RMSE) with a different layer number in the autoencoder