Recommend which product category will maximize purchases
In this use case example, we will be walking through how to use a Recommendations Pipeline to predict the best items and categories specific to each customer using a Machine Learning Pipeline. Specifically, we’ll cover how to recommend the product categories which will best maximize purchases for each user. This use case is relevant to any e-commerce company that is looking to find the best way to layout and display items to a customer.
What data do I need for this prediction?
The objects available for you to recommend within Cortex are based on the Event data that is being ingested. Specifically, any Event Parameter which has 3 or more possible Values can be used as the basis for a Recommendation. Note though that Recommendation Pipelines perform the best when the number of possible values is at least 50 or larger.
- Events with Parameters: events track when users perform specific actions, and parameters help give additional context and information to those events. For example: a View Product event may include parameters for Product ID, Name, and Category. When creating a Recommendations Pipeline, in this example we will be using Product Category as the basis for our Recommendation.
While the above are the only pieces of information required to set up our sample prediction, more data will typically lead to better predictive performance. Other information that can be used to build features for our pipeline include:
- Conversion Events for Optimization: When creating a Recommendations Pipeline, you have the option to choose a specific action for which to Optimize. For example, the action could be Click, Subscribe, Purchase, etc. If you have no specific event for which you want to optimize, the default will be to optimize for any user engagement.
- Additional User Behaviors (e.g. logins, clicks, pageviews, adds to cart, etc.) with additional metadata (e.g. What device is the user on? Where was the user referred from? etc.) which give more detail to the event. As an example of additional metadata for an event, an item category can be passed along with the event in order to differentiate which purchases occurred specifically for the category of interest. Alternatively, item details can be sent in a separate feed as long as the item is identified within your purchase events with a shared ID.
- User Attributes (e.g. demographics, loyalty status, etc.)
How do I Recommend the Best Articles for each User?
Step 1: Choose Pipeline Type
Select ‘Create New Pipeline’ from within your Cortex account, and choose the Recommendations pipeline type.
Step 2: Choose the Object to be Recommended
Select the type of items that should serve as the basis for your recommendations. Available item types are those that (a) are tied to your events (either directly or through an items feed), and (b) contain at least 2 unique items to recommend. Note however that the more unique items there are for your pipeline to recommend, the higher quality and more personalized these recommendations are likely to be.
In this example, we will be selecting the Product Category object to Recommend..
Step 3: Define the Interaction to Optimize
Select the type of event that your pipeline should optimize with its recommendations. You may select any event that captures an interaction between your users and the items that you selected in Step (2). Or, you can choose to optimize for all interactions (the default setting). Cortex will weigh this event more heavily than others when learning each user’s preferences. Your pipeline’s performance will also be evaluated based specifically on this type of interaction.
In this example, we will be optimizing specifically for Purchases.
Step 4: Specify Settings
Settings is where you give a Name to your pipeline as well as the option to add Tags. Name and Tags are the two main ways to find your pipeline within Cortex after it has been created, so best practice is to use descriptive Names and Tags specific to each prediction.
In this example, the pipeline name is “Recommend Top Product Categories” and the Tag “Recommend” has been added as well.
Additionally, you can choose to run this pipeline only once, or have it update continuously. In this example, the pipeline is set to update continuously. This means that any new data ingested into Cortex will automatically be applied to the pipeline to ensure your recommendations are always up to date with the latest data.
Step 5: Review
The final step is to review your pipeline and ensure all settings look accurate! If anything needs updated, simply go ‘Back’ in the workflow and update any step. Otherwise, click ‘Start Training’ and sit back while Cortex generates the predictions.
Those are all the steps necessary to create a recommendations pipeline.
- Future Events Performance
- How to Build a Future Events Pipeline
- How to Build a Look Alike Pipeline
- How to Build a Classification Pipeline
- How to Build a Regression Pipeline
Still have questions? Reach out to email@example.com for more info!