we will not go into detailed mathematical descriptions of the algorithm hereas the intent is to not to keep this section math heavy but to focus on how it can be leveraged to find patterns in this data howeverwe will explain it in brief so you can understand the core concepts in this method the fp growth algorithm uses divide-and-conquer strategy and leverages special data structure called the fp-treeas depicted in figure - to find frequent itemsets without generating all itemsets the core steps of the algorithm are as follows take in the transactional database and create an fp-tree structure to represent frequent itemsets divide this compressed representation into multiple conditional datasets such that each one is associated with frequent pattern mine for patterns in each such dataset so that shorter patterns can be recursively concatenated to longer patternshence making it more efficient if you are interested in finding about ityou can refer to the wikibooks link at org/wiki/data_mining_algorithms_in_r/frequent_pattern_mining/the_fp-growth_algorithmwhich talks about fp growth and the fp tree structure in detail association rule-mining in action we will illustrate association rule-mining using the famous grocery dataset the dataset is available by default in the language' base package to use in in pythonyou can obtain it from stedy/machine-learning-with- -datasets/blob/master/groceries csv or even from our official github repository mentioned at the start of this this dataset consists of collection of transactions that are sourced from grocery retailer we will use this data as the basis of our analysis and build our rule-mining work flow using this data once we have grasped the basics of association rule-mining on the grocery datasetwe will leave it as an exercise for you to apply the same concepts on our transaction dataset that we used in the customer segmentation section remember to load the following dependencies before getting started import csv import pandas as pd import matplotlib pyplot as plt import orange from orange data import domaindiscretevariablecontinuousvariable from orangecontrib associate fpgrowth import %matplotlib inline check out the "mining rulessection for details on how to install the orange framework dependencies the code for this section is available in the cross selling ipynb notebook exploratory data analysis the grocery dataset that we mentioned earlier is arranged so that each of the line occurring in the dataset is transaction the items given in each row are comma-separated and are the items in that particular transaction take look at the first few lines of the dataset depicted in figure -