# Evolving Matrix-Factorization-Based Collaborative Filtering Using Genetic Programming

^{1}

^{2}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Matrix Factorization

#### 2.2. Genetic Programming

`Zero`) and $1.0$ (

`One`), in order to increase the expressiveness in the aggregation functions h generated by the algorithm.

#### 2.3. Experimental Setup

## 3. Results

#### 3.1. Quality of the Recommender System Predictions

`EMF-2`,

`EMF-4`,

`EMF-5`,

`EMF-8`,

`EMF-9`, and

`EMF-10`), the difference between EMF and BiasedMF is negligible, so we can consider that the quality of the predictions is equivalent. On the other hand, the method that gets the best results for MSE is

`EMF-4`. In addition, EMF outperforms the best baseline (BiasedMF) in 4 of the 10 executions made (

`EMF-2`,

`EMF-4`,

`EMF-6`, and

`EMF-10`). These results demonstrate that the proposed method tends to produce fewer large differences between the real rating and the predicted ones.

`EMF-10`provides the best results for MAE and MSE. Furthermore, the proposed method overcomes all tested baselines in all executions performed for both quality measures.

#### 3.2. Results of the Evolutionary Method

`EMF-4`). On the other hand, in Figure 3, we plot the best individual for the FilmTrust dataset (

`EMF-10`). Furthermore, for the sake of completeness, the rest of the individuals have been included in Appendix A. Recall that the correspondence between node symbols and operators are defined in Table 1.

#### 3.3. Convergence of the Evolutionary Method

`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.

## 4. Discussion

## Author Contributions

## Funding

## Conflicts of Interest

## Appendix A

:**EMF-1**`* - cos cos log exp atan`${p}_{u4}$`- atan`–${q}_{i3}$`exp`–`atan log exp`${p}_{u1}$`exp cos log cos log exp - exp cos`${p}_{u2}$`exp`–`atan log atan sin cos cos atan atan exp - log exp atan cos log exp atan`${p}_{u4}$${p}_{u2}$:**EMF-2**`- + + exp sin`${q}_{i3}$`exp + atan`${p}_{u2}$`cos One`${p}_{u1}$`* +`${p}_{u1}$`sin +`${p}_{u1}$`sin + +`${p}_{u1}$`+ + exp`${q}_{i5}$`exp + *`${p}_{u1}$${p}_{u0}$`sin + +`${p}_{u1}$`* + * * One One`${p}_{u0}$${p}_{u1}$${q}_{i2}$`One +`${p}_{u1}$`* + * * One One`${q}_{i4}$${p}_{u1}$${q}_{i2}$`One`${q}_{i2}$:**EMF-3**`-`-`inv inv + inv inv + sin One cos Zero - inv inv + inv inv + sin atan`–`+ + *`${q}_{i0}$ ${p}_{u4}$ ${p}_{u0}$`*`${q}_{i0}$ ${p}_{u4}$`cos Zero cos Zero + * inv inv`${q}_{i3}$ ${p}_{u4}$–`sin atan + +`${q}_{i0}$ ${p}_{u0}$`*`${q}_{i0}$ ${q}_{i0}$`+ * inv inv`${q}_{i3}$ ${p}_{u4}$–`sin atan + +`${q}_{i0}$ ${p}_{u0}$`* cos Zero`${p}_{u4}$`atan`–`+ +`${q}_{i0}$ ${p}_{u0}$`* inv + inv inv + sin One cos Zero cos Zero`${p}_{u4}$:–**EMF-4**`+ -`- ${q}_{i0}$`+ + + One One *`${p}_{u3}$ ${q}_{i0}$`One + One`${p}_{u2}$`*`${p}_{u0}$ ${q}_{i0}$:––**EMF-5**`+ + atan`${q}_{i1}$`+ + atan`${p}_{u5}$`exp`${p}_{u3}$`atan +`–`- exp`${q}_{i2}$`exp atan`${p}_{u4}$ ${q}_{i5}$`exp`${q}_{i1}$:**EMF-6**`log exp + exp atan exp atan - exp atan - exp`${p}_{u0}$${q}_{i5}$${q}_{i5}$`exp atan -`${p}_{u3}$${q}_{i5}$:**EMF-7**`* -`––`cos`–– ${p}_{u1}$`atan inv`–${q}_{i3}$`exp cos * atan`–`exp atan`${p}_{u1}$–${q}_{i4}$:**EMF-8**`- + -`${q}_{i4}$${p}_{u2}$`inv * cos sin -`${q}_{i4}$${p}_{u2}$`atan exp`${q}_{i2}$`- cos -`${q}_{i4}$${p}_{u4}$`cos cos * -`- ${p}_{u2}$`*`${q}_{i4}$`One`${p}_{u2}$–`atan`${p}_{u0}$:**EMF-9**`+ exp`${q}_{i0}$`- exp atan`${p}_{u0}$`+ - Zero - exp`${q}_{i0}$${q}_{i5}$`+ *`${p}_{u5}$${q}_{i5}$`-`${p}_{u4}$${q}_{i2}$:**EMF-10**`exp atan`pow pow`* exp exp`${p}_{u5}$`inv exp`${q}_{i0}$`exp`${p}_{u4}$`exp inv exp`${p}_{u5}$

:**EMF-1**`exp atan + cos`${p}_{u5}$`exp + +`${p}_{u3}$${q}_{i2}$${p}_{u3}$:––**EMF-2**`+ sin`–– ${p}_{u0}$`+ One exp sin cos exp +`${p}_{u6}$–`+ sin`${p}_{u9}$`+ sin`${q}_{i4}$`exp sin`–`+ One exp sin cos`–`+ sin sin`${p}_{u9}$`+ One exp sin cos exp +`${p}_{u6}$–`+ sin`${q}_{i4}$`exp sin`–`sin`${p}_{u9}$:**EMF-3**`inv exp atan -`${p}_{u2}$`exp exp atan - exp - exp -`${p}_{u2}$`exp atan -`${p}_{u2}$${p}_{u7}$`exp -`- ${p}_{u7}$ ${q}_{i3}$`exp atan -`${p}_{u2}$`exp -`${p}_{u2}$`exp atan -`${p}_{u2}$`exp exp atan - exp -`${p}_{u7}$`exp -`- ${p}_{u2}$`exp exp atan - exp -`${p}_{u2}$`exp -`- ${p}_{u7}$ ${q}_{i3}$`exp atan -`${p}_{u2}$`exp -`${p}_{u2}$`exp atan -`${p}_{u2}$`exp exp -`${p}_{u2}$`exp atan -`${p}_{u2}$`-`${p}_{u2}$ ${p}_{u7}$`-`${p}_{u7}$ ${p}_{u2}$ ${p}_{u7}$`-`${p}_{u7}$ ${p}_{u2}$`-`${p}_{u7}$ ${p}_{u2}$:**EMF-4**`+`${p}_{u4}$`exp cos`${q}_{i6}$:**EMF-5**`exp atan - exp exp`${p}_{u1}$–${q}_{i9}$:**EMF-6**`exp atan +`${q}_{i4}$`+ +`${p}_{u3}$`atan atan`${p}_{u2}$`inv`${p}_{u2}$:**EMF-7**`+ atan exp`${q}_{i2}$`exp cos`${p}_{u2}$:**EMF-8**`+ exp`${p}_{u3}$`exp cos sin exp`–`atan`${q}_{i0}$:**EMF-9**`exp inv cos cos exp cos exp atan - * One exp *`${q}_{i6}$`cos cos exp *`${p}_{u7}$${q}_{i2}$`exp atan - * One exp *`${q}_{i6}$`cos`${p}_{u4}$${p}_{u0}$:**EMF-10**`exp atan + * atan + + atan + * atan + +`${q}_{i5}$`atan +`${q}_{i5}$`atan - inv`${p}_{u8}$`*`${q}_{i5}$`inv inv`${p}_{u8}$`inv`${p}_{u8}$`+`${q}_{i5}$`atan - inv`${p}_{u8}$`*`${q}_{i5}$`inv inv`${p}_{u8}$`inv`${p}_{u8}$`atan +`${q}_{i5}$`atan - inv`${p}_{u8}$`*`${q}_{i5}$`inv +`${q}_{i5}$`atan`${q}_{i5}$`inv`${p}_{u8}$`+`${q}_{i5}$`atan - inv`${p}_{u8}$`*`${q}_{i5}$`inv inv`${p}_{u8}$`inv`${p}_{u8}$

## References

- Bobadilla, J.; Ortega, F.; Hernando, A.; Gutiérrez, A. Recommender systems survey. Knowl.-Based Syst.
**2013**, 46, 109–132. [Google Scholar] [CrossRef] - Ricci, F.; Rokach, L.; Shapira, B. Introduction to recommender systems handbook. In Recommender Systems Handbook; Springer: Berlin, Germany, 2011; pp. 1–35. [Google Scholar]
- Wan, X.; Zhang, B.; Zou, G.; Chang, F. Sparse Data Recommendation by Fusing Continuous Imputation Denoising Autoencoder and Neural Matrix Factorization. Appl. Sci.
**2019**, 9, 54. [Google Scholar] [CrossRef] [Green Version] - Melo, E. Improving Collaborative Filtering-Based Image Recommendation through Use of Eye Gaze Tracking. Information
**2018**, 9, 262. [Google Scholar] [CrossRef] [Green Version] - Resnick, P.; Varian, H.R. Recommender systems. Commun. ACM
**1997**, 40, 56–59. [Google Scholar] [CrossRef] - Ai, Q.; Azizi, V.; Chen, X.; Zhang, Y. Learning heterogeneous knowledge base embeddings for explainable recommendation. Algorithms
**2018**, 11, 137. [Google Scholar] [CrossRef] [Green Version] - Adomavicius, G.; Tuzhilin, A. Toward the next generation of recommender systems: A survey of the state-of-the-art and possible extensions. IEEE Trans. Knowl. Data Eng.
**2005**, 17, 734–749. [Google Scholar] [CrossRef] - Herlocker, J.L.; Konstan, J.A.; Borchers, A.; Riedl, J. An algorithmic framework for performing collaborative filtering. In 22nd Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR 1999; Association for Computing Machinery, Inc.: New York, NY, USA, 1999; pp. 230–237. [Google Scholar]
- Schafer, J.B.; Frankowski, D.; Herlocker, J.; Sen, S. Collaborative filtering recommender systems. In The Adaptive Web; Springer: Berlin, Germany, 2007; pp. 291–324. [Google Scholar]
- Su, X.; Khoshgoftaar, T.M. A survey of collaborative filtering techniques. Adv. Artif. Intell.
**2009**, 2009. [Google Scholar] [CrossRef] - Koren, Y.; Bell, R.; Volinsky, C. Matrix factorization techniques for recommender systems. Computer
**2009**, 42, 30–37. [Google Scholar] [CrossRef] - Han, H.; Huang, M.; Zhang, Y.; Bhatti, U. An Extended-Tag-Induced Matrix Factorization Technique for Recommender Systems. Information
**2018**, 9, 143. [Google Scholar] [CrossRef] [Green Version] - Bottou, L. Large-Scale Machine Learning with Stochastic Gradient Descent. In Proceedings of COMPSTAT’2010; Lechevallier, Y., Saporta, G., Eds.; Physica-Verlag HD: Heidelberg, Germany, 2010; pp. 177–186. [Google Scholar]
- Eiben, A.E.; Smith, J.E. Introduction to Evolutionary Computing; Springer: Berlin, Germany, 2003; Volume 53. [Google Scholar]
- Koza, J.R.; Koza, J.R. Genetic Programming: On the Programming of Computers by Means Of Natural Selection; MIT Press: Cambridge, MA, USA, 1992; Volume 1. [Google Scholar]
- González-Prieto, Á.; Lara-Cabrera, R.; Ortega, F. Symbolic Derivation. 2019. Available online: https://github.com/AngelGonzalezPrieto/sym-derivation (accessed on 15 January 2020). [CrossRef]
- Horváth, T.; de Carvalho, A.C.P.L.F. Evolutionary computing in recommender systems: A review of recent research. Nat. Comput.
**2017**, 16, 441–462. [Google Scholar] [CrossRef] - Sadeghi, M.; Asghari, S.A. Recommender Systems Based on Evolutionary Computing: A Survey. J. Softw. Eng. Appl.
**2017**, 10, 407–421. [Google Scholar] [CrossRef] [Green Version] - Belém, F.M.; Martins, E.F.; Almeida, J.M.; Gonçalves, M.A. Personalized and object-centered tag recommendation methods for Web 2.0 applications. Inf. Process. Manag.
**2014**, 50, 524–553. [Google Scholar] [CrossRef] - Anand, D.; Bharadwaj, K.K. Adaptive user similarity measures for recommender systems: A genetic programming approach. In Proceedings of the 2010 3rd International Conference on Computer Science and Information Technology, Chengdu, China, 9–11 July 2010; Volume 8, pp. 121–125. [Google Scholar]
- Guimarães, A.; Costa, T.F.; Lacerda, A.; Pappa, G.L.; Ziviani, N. Guard: A genetic unified approach for recommendation. J. Inf. Data Manag.
**2013**, 4, 295. Available online: https://periodicos.ufmg.br/index.php/jidm/article/view/217 (accessed on 15 January 2020). - Wilhelmstötter, F. JENETICS: Java Genetic Algorithm Library. 2012. Available online: http://jenetics.io/ (accessed on 15 January 2020).
- Harper, F.M.; Konstan, J.A. The movielens datasets: History and context. ACM Trans. Interact. Intell. Syst. (TIIS)
**2016**, 5, 19. [Google Scholar] [CrossRef] - Guo, G.; Zhang, J.; Yorke-Smith, N. A Novel Bayesian Similarity Measure for Recommender Systems. In Proceedings of the 23rd International Joint Conference on Artificial Intelligence (IJCAI), Beijing, China, 3–9 August 2013; pp. 2619–2625. [Google Scholar]
- Mnih, A.; Salakhutdinov, R.R. Probabilistic matrix factorization. Adv. Neural Inf. Process. Syst.
**2008**, 1257–1264. Available online: http://papers.nips.cc/paper/3208-probabilistic-matrix-factorization.pdf (accessed on 15 January 2020). - Lee, D.D.; Seung, H.S. Algorithms for non-negative matrix factorization. Adv. Neural Inf. Process. Syst.
**2001**, 13, 556–562. [Google Scholar] - Hernando, A.; Bobadilla, J.; Ortega, F. A non negative matrix factorization for collaborative filtering recommender systems based on a Bayesian probabilistic model. Knowl.-Based Syst.
**2016**, 97, 188–202. [Google Scholar] [CrossRef] - Rudin, W. Real and Complex Analysis; Mathematics Series; McGraw-Hill: New York, NY, USA, 1987. [Google Scholar]
- Ortega, F.; Zhu, B.; Bobadilla, J.; Hernando, A. CF4J: Collaborative filtering for Java. Knowl.-Based Syst.
**2018**, 152, 94–99. [Google Scholar] [CrossRef] - Ellson, J.; Gansner, E.; Koutsofios, L.; North, S.; Woodhull, G.; Description, S.; Technologies, L. Graphviz— Open Source Graph Drawing Tools; Lecture Notes in Computer Science; Springer: Berlin, Germany, 2001; pp. 483–484. [Google Scholar]
- Herlocker, J.L.; Konstan, J.A.; Terveen, L.G.; Riedl, J.T. Evaluating collaborative filtering recommender systems. ACM Trans. Inf. Syst. (TOIS)
**2004**, 22, 5–53. [Google Scholar] [CrossRef]

**Figure 2.**Tree representation of the best individual (

`EMF-4`) achieved for the MovieLens dataset. The correspondence between node symbols and operators are defined in Table 1.

**Figure 3.**Tree representation of the best individual achieved for the FilmTrust dataset (

`EMF-10`). The correspondence between node symbols and operators are defined in Table 1.

**Figure 4.**Evolution of the 25th percentile (first quartile) of the population fitness for each run on both (

**a**) MovieLens and (

**b**) FilmTrust datasets.

**Figure 5.**Convergence of the evolutionary method on the MovieLens dataset. The plots show the moving average distance ${D}_{5}\left(n\right)$ with window width $W=5$ and $p=2$ during the 150 generations of the 10 executions.

**Figure 6.**Convergence of the evolutive method on the FilmTrust dataset. The plots show the moving average distance ${D}_{5}\left(n\right)$ with window width $W=5$ and $p=2$ during the 150 generations of the 10 executions.

**Figure 7.**Graphical representation of the distances between the best individuals of each execution of EMF for the (

**a**) MovieLens and (

**b**) FilmTrust datasets. The length of the edges is proportional to the ${L}^{2}$ distance between the corresponding aggregate functions. The mean distance in the MovieLens graph is 70% bigger than the mean distance in FilmTrust.

Operator | Arity | Function | Symbol |
---|---|---|---|

Sine | 1 | $\mathrm{sin}\left(x\right)$ | sin |

Cosine | 1 | $\mathrm{cos}\left(x\right)$ | cos |

Arctangent | 1 | $\mathrm{arctan}\left(x\right)$ | atan |

Exponential | 1 | $\mathrm{exp}\left(x\right)$ | exp |

Logarithm | 1 | $\mathrm{log}\left(x\right)$ | log |

Inverse | 1 | $\frac{1}{x}$ | inv |

Sign | 1 | $-x$ | – |

Addition | 2 | $x+y$ | + |

Subtraction | 2 | $x-y$ | - |

Multiplication | 2 | $x\times y$ | * |

Power | 2 | ${x}^{y}$ | pow |

Dataset | #users | #items | #ratings | Rating Scale |
---|---|---|---|---|

MovieLens | 943 | 1682 | 100,000 | 1–5 |

FilmTrust | 1508 | 2071 | 35,497 | 0.5–4.0 |

**Table 3.**Mean Absolute Error (MAE) and Mean Squared Error (MSE) in predictions for MovieLens dataset.

Method | MAE | MSE |
---|---|---|

PMF | 0.7225 | 0.8492 |

BiasedMF | 0.7160 | 0.8406 |

NMF | 0.7672 | 0.9867 |

BNMF | 0.7500 | 0.8860 |

EMF-1 | 0.7256 | 0.8728 |

EMF-2 | 0.7195 | 0.8332 |

EMF-3 | 0.7210 | 0.8427 |

EMF-4 | 0.7197 | 0.8282 |

EMF-5 | 0.7195 | 0.8592 |

EMF-6 | 0.7220 | 0.8377 |

EMF-7 | 0.7255 | 0.8721 |

EMF-8 | 0.7193 | 0.8442 |

EMF-9 | 0.7161 | 0.8441 |

EMF-10 | 0.7163 | 0.8381 |

EMF (best) | 0.7161 | 0.8282 |

EMF (worst) | 0.7256 | 0.8728 |

EMF (avg) | 0.7205 | 0.8472 |

Method | MAE | MSE |
---|---|---|

PMF | 0.7514 | 1.1321 |

BiasedMF | 0.6277 | 0.7050 |

NMF | 0.7950 | 1.3710 |

BNMF | 0.6598 | 0.6987 |

EMF-1 | 0.6046 | 0.6705 |

EMF-2 | 0.6114 | 0.6653 |

EMF-3 | 0.6013 | 0.6778 |

EMF-4 | 0.6303 | 0.6780 |

EMF-5 | 0.6109 | 0.6846 |

EMF-6 | 0.6087 | 0.6808 |

EMF-7 | 0.6108 | 0.6652 |

EMF-8 | 0.6075 | 0.6672 |

EMF-9 | 0.6209 | 0.7050 |

EMF-10 | 0.5993 | 0.6581 |

EMF (best) | 0.5993 | 0.6581 |

EMF (worst) | 0.6303 | 0.7050 |

EMF (avg) | 0.6105 | 0.6752 |

© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Lara-Cabrera, R.; González-Prieto, Á.; Ortega, F.; Bobadilla, J.
Evolving Matrix-Factorization-Based Collaborative Filtering Using Genetic Programming. *Appl. Sci.* **2020**, *10*, 675.
https://doi.org/10.3390/app10020675

**AMA Style**

Lara-Cabrera R, González-Prieto Á, Ortega F, Bobadilla J.
Evolving Matrix-Factorization-Based Collaborative Filtering Using Genetic Programming. *Applied Sciences*. 2020; 10(2):675.
https://doi.org/10.3390/app10020675

**Chicago/Turabian Style**

Lara-Cabrera, Raúl, Ángel González-Prieto, Fernando Ortega, and Jesús Bobadilla.
2020. "Evolving Matrix-Factorization-Based Collaborative Filtering Using Genetic Programming" *Applied Sciences* 10, no. 2: 675.
https://doi.org/10.3390/app10020675