The ability to make relevant recommendations during the purchasing process can have a significant impact on a company’s revenue. In 2012, 35% of Amazon’s sales and 75% of Netflix’s views came from product recommendations. Although they come with some risks (filter bubbles) if not carefully designed, recommendation engines can bring a lot of value to a business.

We helped a well-known restaurant chain to refine the recommendations at their self-service kiosks. The goal was to suggest relevant items to the buyer at any point during the purchasing process (i.e. given any basket).

The dataset contained multiple restaurants and the recommendation engine had factor in time and location. Contrarily to most recommendation engines usually discussed in machine learning, we do not know the users’ history or information when they pass an order, nor the items metadata, making methods like collaborative filtering and content-based recommendations inappropriate for this use case.



Association rule mining

A designated solution to our problem is to use association rule mining. Association rule mining, also known as market basket analysis in the context of retail, consists in mining the item sets that frequently appear together in purchases. It is a simple technique to help retailers and business owners understand their customers behaviours, and consequently do recommendations, arrange their store layout or their catalogue design.

For example, association rule mining can be used to mine rule such as:

  • if a customer has a burger and fries in his basket then, 80% of the time the customer buys a can of coke
  • if a customer visits a webpage 1, then the customer will visit the webpage 2 60% of the time

To extract these rules, we used the Apriori algorithm and a faster technique called FP growth (see glossary for more details).



Significant differences were noted between different times of the day  and locations in the dataset, so the dataset was split between morning and the rest of the day and the analysis was carried for 2 stores.

We evaluated our results on accuracy (defined as is one of the recommended items selected in the final order) and on item coverage. Top 5 recommendations were shown to return between 65 to 70% accuracy for baskets with one item only, and 42 to 45% accuracy for basket of size 2. The item coverage varied between 50 to 77% meaning a wide variety of items from the offer was suggested.

This type of recommendation engine can easily be used and adapted when there is no user and item information. To push sales on new items and further improve the coverage, including a ‘surprise’ element in the recommendations in suggested.