INTRODUCTION

This is a transactional data set which contains all the transactions occurring between 01/12/2010 and 09/12/2011 for a UK-based and registered non-store online retail. obtained from https://archive.ics.uci.edu/dataset/352/online+retail. The company mainly sells unique all-occasion gifts. Many customers of the company are wholesalers. The Tables, graphs and results you will see below are related to the sales that occured in the UK alone. There are several different countries listed in this dataset but my work focuses on the UK. I have also decide to focus my work on the Aprior Algorithm.

Data Preparation

library(dplyr)
library(factoextra)
library(mclust)
library(cluster)
library(ggplot2)
library(readxl)
salesdata <- read_excel("C:/Users/mzing/Desktop/USL/RETAIL SALES/online+retail/Online Retail.xlsx")

str(salesdata)
## tibble [541,909 × 8] (S3: tbl_df/tbl/data.frame)
##  $ InvoiceNo  : chr [1:541909] "536365" "536365" "536365" "536365" ...
##  $ StockCode  : chr [1:541909] "85123A" "71053" "84406B" "84029G" ...
##  $ Description: chr [1:541909] "WHITE HANGING HEART T-LIGHT HOLDER" "WHITE METAL LANTERN" "CREAM CUPID HEARTS COAT HANGER" "KNITTED UNION FLAG HOT WATER BOTTLE" ...
##  $ Quantity   : num [1:541909] 6 6 8 6 6 2 6 6 6 32 ...
##  $ InvoiceDate: POSIXct[1:541909], format: "2010-12-01 08:26:00" "2010-12-01 08:26:00" ...
##  $ UnitPrice  : num [1:541909] 2.55 3.39 2.75 3.39 3.39 7.65 4.25 1.85 1.85 1.69 ...
##  $ CustomerID : num [1:541909] 17850 17850 17850 17850 17850 ...
##  $ Country    : chr [1:541909] "United Kingdom" "United Kingdom" "United Kingdom" "United Kingdom" ...
#Filtering transactions to focus on United Kingdom sales.

uksalesdata <- salesdata %>%
  filter(Country == "United Kingdom") %>%
  filter(!is.na(InvoiceNo) & !is.na(StockCode))

head(uksalesdata)
## # A tibble: 6 × 8
##   InvoiceNo StockCode Description         Quantity InvoiceDate         UnitPrice
##   <chr>     <chr>     <chr>                  <dbl> <dttm>                  <dbl>
## 1 536365    85123A    WHITE HANGING HEAR…        6 2010-12-01 08:26:00      2.55
## 2 536365    71053     WHITE METAL LANTERN        6 2010-12-01 08:26:00      3.39
## 3 536365    84406B    CREAM CUPID HEARTS…        8 2010-12-01 08:26:00      2.75
## 4 536365    84029G    KNITTED UNION FLAG…        6 2010-12-01 08:26:00      3.39
## 5 536365    84029E    RED WOOLLY HOTTIE …        6 2010-12-01 08:26:00      3.39
## 6 536365    22752     SET 7 BABUSHKA NES…        2 2010-12-01 08:26:00      7.65
## # ℹ 2 more variables: CustomerID <dbl>, Country <chr>
# I would like to find out how many distinct Items are sold in the United Kingdom

n_distinct(uksalesdata$Description)
## [1] 4191
# We now know there are 4191 distinct items sold in the UK retail store.

Analysis of One Basket

You can also embed plots, for example:

## # A tibble: 12 × 8
##    InvoiceNo StockCode Description        Quantity InvoiceDate         UnitPrice
##    <chr>     <chr>     <chr>                 <dbl> <dttm>                  <dbl>
##  1 536367    84879     ASSORTED COLOUR B…       32 2010-12-01 08:34:00      1.69
##  2 536367    22745     POPPY'S PLAYHOUSE…        6 2010-12-01 08:34:00      2.1 
##  3 536367    22748     POPPY'S PLAYHOUSE…        6 2010-12-01 08:34:00      2.1 
##  4 536367    22749     FELTCRAFT PRINCES…        8 2010-12-01 08:34:00      3.75
##  5 536367    22310     IVORY KNITTED MUG…        6 2010-12-01 08:34:00      1.65
##  6 536367    84969     BOX OF 6 ASSORTED…        6 2010-12-01 08:34:00      4.25
##  7 536367    22623     BOX OF VINTAGE JI…        3 2010-12-01 08:34:00      4.95
##  8 536367    22622     BOX OF VINTAGE AL…        2 2010-12-01 08:34:00      9.95
##  9 536367    21754     HOME BUILDING BLO…        3 2010-12-01 08:34:00      5.95
## 10 536367    21755     LOVE BUILDING BLO…        3 2010-12-01 08:34:00      5.95
## 11 536367    21777     RECIPE BOX WITH M…        4 2010-12-01 08:34:00      7.95
## 12 536367    48187     DOORMAT NEW ENGLA…        4 2010-12-01 08:34:00      7.95
## # ℹ 2 more variables: CustomerID <dbl>, Country <chr>
## [1] 12

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.

Visualizing Items in One basket

#What is the total number of items in basket_one

basket_one %>% summarise(sum(Quantity))
## # A tibble: 1 × 1
##   `sum(Quantity)`
##             <dbl>
## 1              83
#Basket_one contains 83 Items.


#Visualising the total number of contents in basket_one

ggplot(basket_one, 
       aes(x = reorder(Description, Quantity),
           y = Quantity)) + 
  geom_col(fill = "steelblue") +
  coord_flip() +
  xlab("Items") +
  ggtitle("Summary of Items in Basket one")

Total baskets and averages

#How many possible baskets? 


n_items = 4191
basket_size = 10

choose(n_items, basket_size)
## [1] 4.557712e+29
#How many baskets are there?

n_distinct(uksalesdata$InvoiceNo)
## [1] 23494
#How many items are there in each basket?

basket_size <- uksalesdata %>%
  group_by(InvoiceNo) %>%
  summarise(n_total = n(),
            n_items = n_distinct(Description))

head(basket_size)
## # A tibble: 6 × 3
##   InvoiceNo n_total n_items
##   <chr>       <int>   <int>
## 1 536365          7       7
## 2 536366          2       2
## 3 536367         12      12
## 4 536368          4       4
## 5 536369          1       1
## 6 536371          1       1
#What is the average basket size

basket_size %>%
  summarise(
    avg_total_items = mean(n_total),
    avg_dist_items = mean(n_items)
  )
## # A tibble: 1 × 2
##   avg_total_items avg_dist_items
##             <dbl>          <dbl>
## 1            21.1           20.6

Item Frequency

#Which items appear the most in baskets

most_frequent_items <- uksalesdata %>%
  group_by(Description) %>%                  
  summarise(TotalQuantity = sum(Quantity, na.rm = TRUE)) %>%  
  arrange(desc(TotalQuantity)) 

head(most_frequent_items, 10)
## # A tibble: 10 × 2
##    Description                        TotalQuantity
##    <chr>                                      <dbl>
##  1 WORLD WAR 2 GLIDERS ASSTD DESIGNS          48326
##  2 JUMBO BAG RED RETROSPOT                    43167
##  3 POPCORN HOLDER                             34365
##  4 ASSORTED COLOUR BIRD ORNAMENT              33679
##  5 WHITE HANGING HEART T-LIGHT HOLDER         33193
##  6 PACK OF 12 LONDON TISSUES                  25307
##  7 PACK OF 72 RETROSPOT CAKE CASES            24702
##  8 VICTORIAN GLASS HANGING T-LIGHT            23242
##  9 BROCADE RING PURSE                         22801
## 10 ASSORTED COLOURS SILK FAN                  20322
#Based on the table above, We need to know the number of baskets that contain both items

uksalesdata %>%
  filter(Description %in% c("WORLD WAR 2 GLIDERS ASSTD DESIGNS","JUMBO BAG RED RETROSPOT")) %>%
  group_by(InvoiceNo) %>%
  summarise(n=n()) %>%
  filter(n==2) %>%
  summarise(n_distinct(InvoiceNo))
## # A tibble: 1 × 1
##   `n_distinct(InvoiceNo)`
##                     <int>
## 1                     106

The APRIORI Function

library(arules)
library(dplyr)

#Splitting transactions
uksales_list <- split(uksalesdata$Description, uksalesdata$InvoiceNo)

#Coerce the list into a `transactions` object
uksales_trx <- as(uksales_list, "transactions")

summary(uksales_trx)
## transactions as itemMatrix in sparse format with
##  23494 rows (elements/itemsets/transactions) and
##  4190 columns (items) and a density of 0.004909373 
## 
## most frequent items:
## WHITE HANGING HEART T-LIGHT HOLDER            JUMBO BAG RED RETROSPOT 
##                               2206                               1978 
##           REGENCY CAKESTAND 3 TIER                      PARTY BUNTING 
##                               1832                               1613 
##            LUNCH BAG RED RETROSPOT                            (Other) 
##                               1430                             474219 
## 
## element (itemset/transaction) length distribution:
## sizes
##    0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15 
## 1454 4060 1449  994  730  711  611  606  580  578  495  503  453  444  487  495 
##   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31 
##  500  420  409  433  388  362  308  314  272  224  241  214  226  244  195  166 
##   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47 
##  169  145  158  122  119  118  106  123  110  108   92   86   89   83   86   72 
##   48   49   50   51   52   53   54   55   56   57   58   59   60   61   62   63 
##   79   81   77   49   56   68   63   68   43   55   42   33   52   33   22   37 
##   64   65   66   67   68   69   70   71   72   73   74   75   76   77   78   79 
##   37   35   39   28   35   24   30   36   20   22   32   25   18   17   26   13 
##   80   81   82   83   84   85   86   87   88   89   90   91   92   93   94   95 
##   10   15   18   14   22   15   17    9   17    9   10    9   12   13    6    4 
##   96   97   98   99  100  101  102  103  104  105  106  107  108  109  110  111 
##    9    8   11    4    9    8    3    6    9    2    3    7    3    4    4    7 
##  112  113  114  115  116  117  118  119  120  121  122  123  124  125  126  127 
##    3    5    6    6    7    5    4    7    4    6   11    3    5    1    4    8 
##  128  129  130  131  132  133  134  135  136  137  138  139  140  141  142  143 
##    1    2    4    2    3    2    5    4    2    5    6    2    5    6    2    1 
##  144  145  146  147  148  149  150  151  152  153  154  155  156  157  158  159 
##    5    5    3    2    4    4    3    5    3    6    2    2    2    4    4    1 
##  160  161  162  163  164  165  166  167  168  169  170  171  172  173  174  175 
##    2    3    3    3    2    4    4    1    4    4    1    2    4    3    4    2 
##  176  177  178  179  180  181  182  183  184  185  186  187  188  189  190  191 
##    5    5    4    2    4    2    6    4    3    3    3    2    3    4    4    2 
##  192  193  194  195  196  197  198  199  202  203  204  205  206  207  208  210 
##    3    2    3    3    4    2    2    3    2    5    5    1    2    1    4    1 
##  211  212  213  214  215  216  217  218  219  220  222  223  224  225  226  227 
##    4    1    1    2    1    2    4    2    1    2    1    1    3    3    1    1 
##  228  229  230  232  233  234  235  237  238  239  241  242  243  244  247  249 
##    1    2    1    1    1    1    1    3    3    1    2    1    2    2    2    3 
##  250  253  254  255  257  261  262  263  264  266  267  270  275  279  280  282 
##    2    1    2    2    2    2    2    1    2    1    1    2    1    2    2    1 
##  283  285  286  288  289  291  292  295  296  298  299  301  309  310  315  319 
##    2    2    1    2    1    1    1    1    1    2    1    1    1    1    1    1 
##  320  331  332  333  334  339  341  344  345  347  348  349  352  354  357  358 
##    1    1    4    1    1    1    1    1    1    2    1    1    2    1    1    1 
##  363  369  375  376  379  382  386  388  399  404  408  411  414  415  416  419 
##    1    1    1    1    1    1    1    1    2    2    1    1    1    1    2    1 
##  420  428  433  434  438  439  443  449  453  455  458  460  463  471  482  486 
##    1    1    1    2    1    2    1    1    1    1    1    1    1    1    1    1 
##  487  488  494  499  503  506  514  515  517  518  520  522  524  525  527  529 
##    1    1    1    1    2    1    1    1    1    1    1    1    1    2    1    1 
##  531  536  539  541  543  552  561  567  572  578  585  588  589  593  595  599 
##    1    1    1    1    1    1    1    1    1    1    2    1    1    1    1    1 
##  601  607  622  629  635  645  647  649  661  673  676  687  703  720  731  748 
##    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1    1 
## 1108 
##    1 
## 
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##    0.00    2.00    9.00   20.57   23.00 1108.00 
## 
## includes extended item information - examples:
##                    labels
## 1   *Boombox Ipod Classic
## 2 *USB Office Mirror Ball
## 3                       ?
## 
## includes extended transaction information - examples:
##   transactionID
## 1        536365
## 2        536366
## 3        536367

Inspections

rules.uksales <- apriori(uksales_trx,
                        parameter = list(supp = 0.01, conf = 0.8, minlen = 2))
## Apriori
## 
## Parameter specification:
##  confidence minval smax arem  aval originalSupport maxtime support minlen
##         0.8    0.1    1 none FALSE            TRUE       5    0.01      2
##  maxlen target  ext
##      10  rules TRUE
## 
## Algorithmic control:
##  filter tree heap memopt load sort verbose
##     0.1 TRUE TRUE  FALSE TRUE    2    TRUE
## 
## Absolute minimum support count: 234 
## 
## set item appearances ...[0 item(s)] done [0.00s].
## set transactions ...[4190 item(s), 23494 transaction(s)] done [0.21s].
## sorting and recoding items ... [601 item(s)] done [0.01s].
## creating transaction tree ... done [0.01s].
## checking subsets of size 1 2 3 4 done [0.03s].
## writing ... [29 rule(s)] done [0.00s].
## creating S4 object  ... done [0.00s].
#Inspect the first 5 transactions
inspect(head(rules.uksales, 5))
##     lhs                                      rhs                                     support confidence   coverage      lift count
## [1] {REGENCY TEA PLATE PINK}              => {REGENCY TEA PLATE GREEN}            0.01034307  0.8933824 0.01157742 61.914823   243
## [2] {REGENCY TEA PLATE PINK}              => {REGENCY TEA PLATE ROSES}            0.01008768  0.8713235 0.01157742 52.355179   237
## [3] {WOODEN TREE CHRISTMAS SCANDINAVIAN}  => {WOODEN STAR CHRISTMAS SCANDINAVIAN} 0.01123691  0.8488746 0.01323742 41.376473   264
## [4] {REGENCY TEA PLATE GREEN}             => {REGENCY TEA PLATE ROSES}            0.01200306  0.8318584 0.01442922 49.983840   282
## [5] {JUMBO BAG PINK POLKADOT,                                                                                                     
##      JUMBO BAG SCANDINAVIAN BLUE PAISLEY} => {JUMBO BAG RED RETROSPOT}            0.01089640  0.8366013 0.01302460  9.936861   256
#inspect the first 5 rules with highest lift
inspect(head(sort(rules.uksales, by = "lift"), 5))
##     lhs                                     rhs                                     support confidence   coverage     lift count
## [1] {REGENCY TEA PLATE PINK}             => {REGENCY TEA PLATE GREEN}            0.01034307  0.8933824 0.01157742 61.91482   243
## [2] {REGENCY TEA PLATE PINK}             => {REGENCY TEA PLATE ROSES}            0.01008768  0.8713235 0.01157742 52.35518   237
## [3] {REGENCY TEA PLATE GREEN}            => {REGENCY TEA PLATE ROSES}            0.01200306  0.8318584 0.01442922 49.98384   282
## [4] {WOODEN TREE CHRISTMAS SCANDINAVIAN} => {WOODEN STAR CHRISTMAS SCANDINAVIAN} 0.01123691  0.8488746 0.01323742 41.37647   264
## [5] {JUMBO BAG RED RETROSPOT,                                                                                                   
##      SUKI  SHOULDER BAG}                 => {DOTCOM POSTAGE}                     0.01059845  0.8924731 0.01187537 29.57371   249
#Transform the rules back to a dataframe
rules.df <- as(rules.uksales, "data.frame")

#check the first record again
inspect(head(sort(rules.uksales, by = "count"), 5))
##     lhs                                    rhs                                  support confidence   coverage      lift count
## [1] {PINK REGENCY TEACUP AND SAUCER,                                                                                         
##      ROSES REGENCY TEACUP AND SAUCER}   => {GREEN REGENCY TEACUP AND SAUCER} 0.02115434  0.8922801 0.02370818 21.611575   497
## [2] {GREEN REGENCY TEACUP AND SAUCER,                                                                                        
##      PINK REGENCY TEACUP AND SAUCER}    => {ROSES REGENCY TEACUP AND SAUCER} 0.02115434  0.8495726 0.02489997 19.900159   497
## [3] {JUMBO BAG PINK POLKADOT,                                                                                                
##      JUMBO STORAGE BAG SUKI}            => {JUMBO BAG RED RETROSPOT}         0.01736614  0.8031496 0.02162254  9.539533   408
## [4] {JUMBO BAG PINK POLKADOT,                                                                                                
##      JUMBO SHOPPER VINTAGE RED PAISLEY} => {JUMBO BAG RED RETROSPOT}         0.01566357  0.8034934 0.01949434  9.543617   368
## [5] {CHARLOTTE BAG SUKI DESIGN,                                                                                              
##      STRAWBERRY CHARLOTTE BAG}          => {RED RETROSPOT CHARLOTTE BAG}     0.01379076  0.8202532 0.01681280 20.969562   324

Rule1 indicates from the LHS, If {Regency Tea plate pink} is bought there is a 1.03%(support) chance that {Regency tea plate green} will also be purchased in the same transaction. It also indicates there is an 89.35 confidence that both items are purchased. The lift of 61.91 indicates that these two items have a very strong association meaning they are most likely to be bought together. This rule appears in 243 transactions.

GRAPHS

library(arules)
library(arulesViz)


frequent_itemsets <- apriori(
  data = uksales_trx,
  parameter = list(supp = 0.01, target = "frequent itemsets")
)
## Apriori
## 
## Parameter specification:
##  confidence minval smax arem  aval originalSupport maxtime support minlen
##          NA    0.1    1 none FALSE            TRUE       5    0.01      1
##  maxlen            target  ext
##      10 frequent itemsets TRUE
## 
## Algorithmic control:
##  filter tree heap memopt load sort verbose
##     0.1 TRUE TRUE  FALSE TRUE    2    TRUE
## 
## Absolute minimum support count: 234 
## 
## set item appearances ...[0 item(s)] done [0.00s].
## set transactions ...[4190 item(s), 23494 transaction(s)] done [0.20s].
## sorting and recoding items ... [601 item(s)] done [0.01s].
## creating transaction tree ... done [0.01s].
## checking subsets of size 1 2 3 4 done [0.02s].
## sorting transactions ... done [0.00s].
## writing ... [1115 set(s)] done [0.00s].
## creating S4 object  ... done [0.00s].
#The data shows that this is the most purchased item "WHITE HANGING HEART T-LIGHT HOLDER" with a 9.39% support.



#Inspect the top 10 frequent itemsets
inspect(head(sort(frequent_itemsets, by = "support"), 10))
##      items                                support    count
## [1]  {WHITE HANGING HEART T-LIGHT HOLDER} 0.09389631 2206 
## [2]  {JUMBO BAG RED RETROSPOT}            0.08419171 1978 
## [3]  {REGENCY CAKESTAND 3 TIER}           0.07797736 1832 
## [4]  {PARTY BUNTING}                      0.06865583 1613 
## [5]  {LUNCH BAG RED RETROSPOT}            0.06086660 1430 
## [6]  {ASSORTED COLOUR BIRD ORNAMENT}      0.05882353 1382 
## [7]  {SET OF 3 CAKE TINS PANTRY DESIGN}   0.05537584 1301 
## [8]  {LUNCH BAG  BLACK SKULL.}            0.05265174 1237 
## [9]  {NATURAL SLATE HEART CHALKBOARD}     0.05260918 1236 
## [10] {HEART OF WICKER SMALL}              0.05001277 1175
rules <- apriori(
  data = uksales_trx,
  parameter = list(supp = 0.01, conf = 0.8, minlen = 2)
)
## Apriori
## 
## Parameter specification:
##  confidence minval smax arem  aval originalSupport maxtime support minlen
##         0.8    0.1    1 none FALSE            TRUE       5    0.01      2
##  maxlen target  ext
##      10  rules TRUE
## 
## Algorithmic control:
##  filter tree heap memopt load sort verbose
##     0.1 TRUE TRUE  FALSE TRUE    2    TRUE
## 
## Absolute minimum support count: 234 
## 
## set item appearances ...[0 item(s)] done [0.00s].
## set transactions ...[4190 item(s), 23494 transaction(s)] done [0.19s].
## sorting and recoding items ... [601 item(s)] done [0.01s].
## creating transaction tree ... done [0.01s].
## checking subsets of size 1 2 3 4 done [0.03s].
## writing ... [29 rule(s)] done [0.00s].
## creating S4 object  ... done [0.00s].
# Sort rules by lift and inspect the top 10
sorted_rules <- sort(rules, by = "lift")
inspect(head(sorted_rules, 10))
##      lhs                                     rhs                                     support confidence   coverage     lift count
## [1]  {REGENCY TEA PLATE PINK}             => {REGENCY TEA PLATE GREEN}            0.01034307  0.8933824 0.01157742 61.91482   243
## [2]  {REGENCY TEA PLATE PINK}             => {REGENCY TEA PLATE ROSES}            0.01008768  0.8713235 0.01157742 52.35518   237
## [3]  {REGENCY TEA PLATE GREEN}            => {REGENCY TEA PLATE ROSES}            0.01200306  0.8318584 0.01442922 49.98384   282
## [4]  {WOODEN TREE CHRISTMAS SCANDINAVIAN} => {WOODEN STAR CHRISTMAS SCANDINAVIAN} 0.01123691  0.8488746 0.01323742 41.37647   264
## [5]  {JUMBO BAG RED RETROSPOT,                                                                                                   
##       SUKI  SHOULDER BAG}                 => {DOTCOM POSTAGE}                     0.01059845  0.8924731 0.01187537 29.57371   249
## [6]  {RED RETROSPOT CHARLOTTE BAG,                                                                                               
##       STRAWBERRY CHARLOTTE BAG,                                                                                                  
##       WOODLAND CHARLOTTE BAG}             => {CHARLOTTE BAG SUKI DESIGN}          0.01064101  0.8169935 0.01302460 23.58040   250
## [7]  {CHARLOTTE BAG PINK POLKADOT,                                                                                               
##       CHARLOTTE BAG SUKI DESIGN,                                                                                                 
##       STRAWBERRY CHARLOTTE BAG}           => {RED RETROSPOT CHARLOTTE BAG}        0.01021537  0.9160305 0.01115178 23.41809   240
## [8]  {CHARLOTTE BAG PINK POLKADOT,                                                                                               
##       RED RETROSPOT CHARLOTTE BAG,                                                                                               
##       WOODLAND CHARLOTTE BAG}             => {CHARLOTTE BAG SUKI DESIGN}          0.01025794  0.8006645 0.01281178 23.10910   241
## [9]  {CHARLOTTE BAG PINK POLKADOT,                                                                                               
##       CHARLOTTE BAG SUKI DESIGN,                                                                                                 
##       WOODLAND CHARLOTTE BAG}             => {RED RETROSPOT CHARLOTTE BAG}        0.01025794  0.8700361 0.01179024 22.24225   241
## [10] {CHARLOTTE BAG PINK POLKADOT,                                                                                               
##       STRAWBERRY CHARLOTTE BAG}           => {RED RETROSPOT CHARLOTTE BAG}        0.01349281  0.8684932 0.01553588 22.20281   317
itemFrequencyPlot(uksales_trx, topN = 10, type = "absolute", 
                  main = "Top 10 Frequent Items",
                  col = rainbow (10),
                  ylab = "",
                  horiz = T)

this table shows the most frequently bought items.

Interactive Table

inspectDT(rules)
top5subrules <- head(sort(rules, by = "confidence"), 5)

inspect(top5subrules)
##     lhs                                  rhs                                  support confidence   coverage     lift count
## [1] {CHARLOTTE BAG PINK POLKADOT,                                                                                         
##      CHARLOTTE BAG SUKI DESIGN,                                                                                           
##      STRAWBERRY CHARLOTTE BAG}        => {RED RETROSPOT CHARLOTTE BAG}     0.01021537  0.9160305 0.01115178 23.41809   240
## [2] {PINK REGENCY TEACUP AND SAUCER,                                                                                      
##      REGENCY CAKESTAND 3 TIER,                                                                                            
##      ROSES REGENCY TEACUP AND SAUCER} => {GREEN REGENCY TEACUP AND SAUCER} 0.01123691  0.8979592 0.01251383 21.74913   264
## [3] {REGENCY TEA PLATE PINK}          => {REGENCY TEA PLATE GREEN}         0.01034307  0.8933824 0.01157742 61.91482   243
## [4] {JUMBO BAG RED RETROSPOT,                                                                                             
##      SUKI  SHOULDER BAG}              => {DOTCOM POSTAGE}                  0.01059845  0.8924731 0.01187537 29.57371   249
## [5] {PINK REGENCY TEACUP AND SAUCER,                                                                                      
##      ROSES REGENCY TEACUP AND SAUCER} => {GREEN REGENCY TEACUP AND SAUCER} 0.02115434  0.8922801 0.02370818 21.61158   497

Based on the inspection of top5subrules,

Rule1 indicates: when a customer buys {CHARLOTTE BAG PINK POLKADOT, CHARLOTTE BAG SUKI DESIGN, STRAWBERRY CHARLOTTE BAG}, they are very likely (91.6% confidence) to also buy {RED RETROSPOT CHARLOTTE BAG}. The lift for this relationship is very high 23.42, which shows a significant dependancy.

Rule3 indicates: When a customer buys {REGENCY TEA PLATE PINK} there’s an 89.3% chance that {REGENCY TEA PLATE GREEN} is also purchased. The lift (61.91) indicates an exceptionally strong relationship.

Rules2,4 and 5 can be interpreted in a like manner. Feel free to use the interactive table to see the relationships between other products.