Data Preparation

Part III: Building a Recommendation System with the AI & Analytics Engine

Ready to build your own recommendation system? Find out how you can do so with the AI & Analytics Engine, in just a few simple steps!


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. 

As an AutoML platform, the Engine takes you through the entire process of data upload, data preparation, data visualization, and model creation and deployment. No coding necessary on your part! All you need is the right dataset with relevant information to build your recommendation system. 

Are you an entrepreneur looking to use AutoMLs? Check out this in-depth article to learn more about AutoMLs and how you can use them to innovate with ML!

If you’re interested in exploring the other 2 use cases, you can access them here:

Part 1: Identifying if customer ratings of a product are genuine

Part 2: Calculating your Net Promoter Score (NPS)

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.

Recommendation System

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

  1. Drop the columns we don’t need and rename the remaining columns for easier distinction.

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

before and after - dropping columns
 

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.

dataset preview after creating pivot table

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.

dataset preview from creating a pivot table

 

Step 3: Create an application

Next, we create a new application and add a feature set that contains the Rating column group as features.

creating a feature set

Step 4: Model selection and evaluation

  1. To see the recommendation made by similar users, we can use the KNN classifier.

model selection

2. From the image below, we can see that the recommender model has an accuracy of 99.3%.

model recommender accuracy

 

Wrap up

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. 

Want to build your own recommendation system? Easy. Simply follow along with the steps above with a free trial of the Engine!

Free Trial

Similar posts

Subscribe and get the latest news, articles, and thought pieces direct to your inbox.