# Evolving Matrix-Factorization-Based Collaborative Filtering Using Genetic Programming
## 3 Results
### Convergence of the Evolutionary Method  
As described in Section 2.3, we have computed the moving average distances \(D_{W}(n)\) in order to test the convergence of the GP method. To get a fair balance between locality of the compared best individuals and a global perspective, we have set the window width to \(W=5\). The results of these tests are shown in Figures 5 and 6. In this way, in Figure 5, we show the evolution of the function \(D_{5}(n)\) for the MovieLens dataset for each of the 10 executions of the EMF method. In this figure, we can observe the existence of wide variations between the best individuals along the first 80-100 generations. These variations correspond to the exploratory phase of the GP search algorithm. During this phase, the maximum of the fitness function has not achieved its stable regime so new individuals, potentially very different from the previous best solution, may obtain better scores, giving rise to the observed large fluctuations. From the 100 th generation on, the variations are tamer, corresponding to the stable phase of the algorithm. In this regime, the algorithm has approached to a local maximum and only very local changes towards the maximum point produce variations. Observe that, in all the cases, from the 130 th generation on, the variations are negligible. Hence, from this analysis we conclude that the EMF method has a satisfactory convergence towards the proposed final solution in the MovieLens dataset. In Figure 6, we show the evolution of the \(D_{5}(n)\) function along the 10 executions on the FilmTrust dataset. In these plots, we also observe that the largest variations are produced during the first steps of the algorithm, corresponding to the exploratory phase. However, in this case, we observe that the fluctuations are less sharp than in the MovieLens dataset. Even more, the stable regime is achieved much sooner that in the MovieLens case, with no significant variations later than the 80 th generation in 8 of the 10 executions (and the variations in the 2 left are much milder). Therefore, this analysis provides strong evidences of the convergence of the EMF method for the FilmTrust dataset, with a faster convergence rate than for MovieLens. This suggests that the search problem in the FilmTrust dataset is easier than in the MovieLens dataset so the GP method finds the local minimum sooner, shortening the exploratory phase. In order to strengthen our conclusions, in Figure 7 we show a representation of the distances between the best individuals of each execution of the EMF method, both for MovieLens and FilmTrust. For that purpose, we depict a weighted undirected complete graph whose vertices are the 10 executions of the EMF method. The edges are weighted with the \(L^{2}\) distance between the corresponding best individuals of the executions. The plotting has been generated with the Neato Graphviz library [30] in such a way that the planar plots preserve as much as possible the prescribed relative distances between the vertices. The mean of the distances between the best individuals in the MovieLens experiment is 2.178 while the mean of the distances in the FilmTrust case is 1.284. This means that the distances in the MovieLens case are approximately 70% bigger than in the FilmTrust case. Accordingly, Figure 7 shows that the distances between the best individuals of the executions on the FilmTrust dataset are significantly smaller than the distances between the best individuals on the MovieLens dataset. Moreover, the nodes in the FilmTrust case essentially form a single cluster (except maybe EMF-6 and EMF-10). On the other hand, the nodes in the MovieLens graph are sparser and cannot be grouped into a single cluster. This supports the observation that the search problem for the FilmTrust dataset is easier than in the MovieLens case. For FilmTrust, the GP algorithm finds an essentially unique local minimum, and all the solutions are distributed around it.