Summary
In this chapter, we built a recommendation engine based on the matrix factorization algorithm. After we introduced the business scenario, we discovered what matrix factorization is and the difference between explicit and implicit models. Before diving into data exploration, we enabled BigQuery Flex Slots, which are necessary to train this category of ML algorithms.
Then, we applied some analyses and data preparation steps to the sample data collected by Google from the Google Merchandise e-commerce portal. Here, we've focused on the fields that were actually required to build our BigQuery ML model.
Next, we created our training table, which includes the purchases that were made by each user, along with the related quantity for each product.
After that, we trained our matrix factorization model on the data that we'd prepared. When the model was trained, we evaluated its key performance indicators using SQL code and the BigQuery UI.
Finally, we generated...