Association Rules
Last updated
Last updated
Very popular on ecommerce sites, Association Rules or Basket Analysis identify relationships between products. This type of technique makes it possible to offer products that other people have purchased when browsing a specific product page.
Many other applications are possible with this type of technique, such as identifying fraud in tenders (associations between participating companies), identifying affinities between people, among other applications.
Gaio uses Pycaret to perform the calculations.
To identify associations between your data, click on the table that contains at least two columns (Transaction and Item), access the Tasks menu and choose the Association Rules task.
Set the task name.
Define the name of the table to be generated with the rules.
Minimum Support : amount of sales in which the two "products" were together divided by total sales.
Minimum Confidence : Given that product A was sold, what is the probability that B will be sold?
Transaction ID : This is the column that needs to be informed, containing the "sale code".
Item ID : Here the column containing the “product” identification must be highlighted.
Having configured this information, the task can be run to search for associations.
As a result of executing the technique, a table containing the associations is generated. Each line represents an association found based on two defined criteria (minimum support and minimum confidence).
antecedents : In this column appear one or more "products" that, if "purchased", increase the probability of what is in the consequents being purchased.
consequents: Here are presented the "products" that are enhanced if the antecedents are sold.
The columns with relationship statistics are:
Indicator | Formula | Variation |
support(A->B) | support(A+B) | 0 to 1 |
confidence(A->B) | support(A+B) / support(A) | 0 to 1 |
lift(A->B) | confidence(A->B) / support(B) | 0 to information |
leverage(A->B) | support(A->B) – support(A)*support(B) | 0 to 1 |
conviction | [1 – support(B)] / [1 – confidence(A->B)] | 0 to information |