Icon

Using Association Rules for Market Basket Analysis

There has been no title set for this workflow's metadata.

This workflow takes pre-built association rules and applies them to a new data set.

URL: Market Basket Analysis and Recommendation Engines https://www.knime.org/blog/market-basket-analysis-and-recommendation-engines
URL: Recommendation Engines https://youtu.be/z8jbAm38yXs

Using Association Rules for Market Basket Analysis


Data Reading

3 files:

  • Association rules

  • Products info

  • Read current basket data

The files are located in TheData/Baskets

For the basket data, in this case we used a Table Creator node. You can read your current basket data from your database or from whatever source.

Double-click the metanode to see the subworkflow.

Data Processing

  • Find the best match for the current basket using the Subset Matcher node

  • Find top matching rules in terms of highest support, highest confidence, and highest revenue

  • Calculate total price of current basket

  • Append price of current basket

  • Split the two top recommendations in two different tables

Double-click the metanode to see the subworkflow.


Visualize

Display the two recommendations in an interactive table view.

Task

Apply the pre-built association rules to a new set of data


Read associationrulesand product info
Product Infos / Association Rules
Calculate totalprice ofcurrent basket
Total Price of current Basket
Append price ofcurrent basketand split the tworecommendations
Refine
Find top 2 rules by:support, confidence, revenue
Top 2 Rules
Top 2 product recommendations based on the input shop cart
Table View
Transforms string row into item collection
Cell Splitter
Insert the content of yourshop cart through aTable Creator node
Table Creator
Find bestmatch for yourcurrent shop cart
Subset Matcher

Nodes

Extensions

Links