E-commerce, or the act of selling goods or services online, has reshaped the way businesses operate in recent years. Among the top advantages of e-commerce businesses are eliminating geographical limitations and better opportunities for promoting products. In this assignment, you will be implementing a simple online supermarket that showcases some of the benefits of modern e-commerce applications.
Products available in the online supermarket have a name, price, list of keywords, and image. For example, the product "cheese" has the keywords "dairy", "breakfast", and "food" associated.
Your application should allow the user to search for products based on name and keyword. In the example below, the search query "dairy" prompts all products containing "dairy" as a keyword. Your application must display the name, price, and image for each product that matches the search query.
Figure: see image.
Your application must allow the user to select products to buy by clicking on the products displayed in the search results. All products selected for purchase must be displayed in a separate section in the page, i.e., a shopping cart.
Figure: see image.
In this part, you will be recommending products to the user based on the notion of collaborative filtering. Collaborative filtering is about leveraging what other people have purchased to make recommendations to other customers. The intuition behind this approach is that if a person buys a given product, then the person might also be interested in some other product because we have seen lots of examples in the past of people buying those pairs of products together. So, the idea is to use this co-occurrence of purchases to make recommendations.
In this assignment, you will use a matrix of co-occurrences to determine which products to recommend the user given the choice of another product. For example, if a customer purchases wine, you are going to look at the wine row in the co-occurrence matrix below. This row has how often people bought wine and each of the other products in the past. For cheese, it says 74, and for toothpaste, it says 3. Now you can straightforwardly make your recommendations. All you need to do is to sort this array and recommend the items with the largest counts. So in this case, you will probably recommend wine and napkins for somebody who purchases wine.
Figure: see image.
To determine the largest counts, you will use a threshold value of 50, meaning that you will recommend a product if it has a count greater than 50 in the co-occurrence matrix. In addition to filtering out products with a count of less than 50, you also need to display the recommendations sorted by count.
Figure: see image.
Your application must allow the user to select products to buy by clicking on the products displayed in the recommendations section and adding them to the shopping cart.
The last part is an extension of the basic implementation described above. Your extension must include one of the following features: