Part III: Building a Recommendation System with the AI & Analytics Engine
This is the final part of our 3-part series, where we use the Consumer Reviews of Amazon Products dataset from Kaggle to showcase 3 unique use cases with the help of the AI & Analytics Engine.
If you’re interested in exploring the other 2 use cases, you can access them here:
For other business use cases, check out our article on the Top 18 essential AI Use Cases in Leading Industries!
In this use case, we want to build a recommendation system. We want this recommendation system to recommend certain products to a customer, by evaluating what similar customers have recommended. We consider other customers to be similar when they have similar ratings to other customers. The benefit of having a recommendation system is the ability to cross-sell the right products to the right customer, essentially, increasing revenue.
Steps to building the recommendation system
Step 1: Dataset upload
The AI & Analytics Engine supports different formats of data uploads like CSV and Excel.
Step 2: Data preparation
- Drop the columns we don’t need and rename the remaining columns for easier distinction.
- The Product column contains the Amazon IDs referring to the product. IDs are each 10 characters, separated by commas. We only want to keep the first ID. Here is a preview of what happens when we apply this action.
3. Cast the Rating column to the numeric type.
4. Fill in the null values in the Recommend column based on Rating: If the Recommend value is missing and the Rating value is more than 3, set the Recommend value to 1. If the Rating value is less than 3, set the Recommend value to 0.
5. Create a new User_Total column using the aggregate action in the Engine. This will reflect the total number of reviews made by each user.
6. Let’s say we want to build recommendations specifically for the product with ID “B018Y226XO”. To prevent the ratings for this product from affecting the prediction, we will set all ratings for this product to be 0.
7. Filter rows to only keep records from users with at least 3 reviews, and to view only products in the electronics category.
8. Create a pivot table with User as rows and Product as columns.
9. Extract the Product ID “ B018Y226XO “ component for the Recommend pivot column group. This is the Target column that we want to predict.
10. Only keep rows with the Target value present and cast the Target column to categorical.
Step 3: Create an application
Next, we create a new application and add a feature set that contains the Rating column group as features.
Step 4: Model selection and evaluation
2. From the image below, we can see that the recommender model has an accuracy of 99.3%.
This article shows you how to create a recommendation system simply by using a dataset with all the relevant information, and the AI & Analytics Engine. All these in just a few simple steps.