#chunks
knitr::opts_chunk$set(eval=TRUE, message=FALSE, warning=FALSE, fig.height=5, fig.align='center')

#libraries
library(tidyverse)
library(fpp3)
library(GGally)
library(gridExtra)
library(reshape2)
library(Hmisc)
library(corrplot)
library(e1071)
library(caret)
library(VIM)
library(forecast)
library(urca)
library(earth)
library(kernlab)
library(aTSA)
library(arules)
library(arulesViz)
library(factoextra)

Assignment

Imagine 10000 receipts sitting on your table. Each receipt represents a transaction with items that were purchased. The receipt is a representation of stuff that went into a customer’s basket - and therefore ‘Market Basket Analysis’. That is exactly what the Groceries Data Set contains: a collection of receipts with each line representing 1 receipt and the items purchased. Each line is called a transaction and each column in a row represents an item. The data set is attached. Your assignment is to use R to mine the data for association rules. You should report support, confidence and lift and your top 10 rules by lift. Extra credit: do a simple cluster analysis on the data as well. Use whichever packages you like.

1. Market Basket Analysis

The dataset was loaded from Github with read.transactions() function to convert it straight into a transactions object. There are 9,835 transcations in the dataset (each is a customer receipt), and 169 of unique items. The proportion of non-zero items in the transaction matrix is 2.61%. Most popular items are “whole milk,” “other vegetables,” “rolls/buns,” “soda,” and “yogurt.”

The apriori() function was used to generated rules with parameters:
Support Threshold = 0.01 (the rules apply to at least 1% of transactions)
The confidence threshold = 0.5 (rules must be accurate at least 50% of the time)

The table and the plot below show top 10 rules ranked by lift (the strength of the rule as contrasted to random chance). Edges represent rules, thicker edges and larger nodes suggest stronger lift-and-support laws. There is a significant connections between dairy products (e.g., “whole milk,” “yogurt”) and vegetables. The rule {citrus fruit, root vegetables} → {other vegetables} has the maximum lift (3.03), showing that customers who buy “citrus fruit” and “root vegetables” are more likely to buy “other vegetables.” Dairy items, particularly “whole milk,” are commonly used as the consequence in rules. The rule {rolls/buns, root vegetables} → {other vegetables} has a lift of 2.59, “rolls/buns” and “root vegetables” are moderately associated with “other vegetables,” likely for meal preparation. The rule {root vegetables, yogurt} → {other vegetables} has a lift of (2.58) wwhich emphasizes the centrality of “other vegetables” in baskets. For other rules we also see the connection between dairy products, between fruits, vegetables and essential dairy products

Based on the analysis, we can provide recommendations:
- For product Placement: keep “root vegetables” and “other vegetables” close together to facilitate cross-selling.
- For promotions: use rules with a high lift (for example, yogurt and curd with whole milk). - Make bundles of frequently linked items (“yogurt,” “whole milk,” “curd”).

# Load data from Github
data <- read.transactions("https://raw.githubusercontent.com/ex-pr/DATA624/refs/heads/main/market_basket_analysis/GroceryDataSet.csv", sep = ",")
basket_df <- data
##Check transcations
set.seed(547)
str(basket_df)
## Formal class 'transactions' [package "arules"] with 3 slots
##   ..@ data       :Formal class 'ngCMatrix' [package "Matrix"] with 5 slots
##   .. .. ..@ i       : int [1:43367] 29 88 118 132 33 157 167 166 38 91 ...
##   .. .. ..@ p       : int [1:9836] 0 4 7 8 12 16 21 22 27 28 ...
##   .. .. ..@ Dim     : int [1:2] 169 9835
##   .. .. ..@ Dimnames:List of 2
##   .. .. .. ..$ : NULL
##   .. .. .. ..$ : NULL
##   .. .. ..@ factors : list()
##   ..@ itemInfo   :'data.frame':  169 obs. of  1 variable:
##   .. ..$ labels: chr [1:169] "abrasive cleaner" "artif. sweetener" "baby cosmetics" "baby food" ...
##   ..@ itemsetInfo:'data.frame':  0 obs. of  0 variables
summary(basket_df)
## transactions as itemMatrix in sparse format with
##  9835 rows (elements/itemsets/transactions) and
##  169 columns (items) and a density of 0.02609146 
## 
## most frequent items:
##       whole milk other vegetables       rolls/buns             soda 
##             2513             1903             1809             1715 
##           yogurt          (Other) 
##             1372            34055 
## 
## element (itemset/transaction) length distribution:
## sizes
##    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15   16 
## 2159 1643 1299 1005  855  645  545  438  350  246  182  117   78   77   55   46 
##   17   18   19   20   21   22   23   24   26   27   28   29   32 
##   29   14   14    9   11    4    6    1    1    1    1    3    1 
## 
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   1.000   2.000   3.000   4.409   6.000  32.000 
## 
## includes extended item information - examples:
##             labels
## 1 abrasive cleaner
## 2 artif. sweetener
## 3   baby cosmetics
inspect(head(basket_df))
##     items                      
## [1] {citrus fruit,             
##      margarine,                
##      ready soups,              
##      semi-finished bread}      
## [2] {coffee,                   
##      tropical fruit,           
##      yogurt}                   
## [3] {whole milk}               
## [4] {cream cheese,             
##      meat spreads,             
##      pip fruit,                
##      yogurt}                   
## [5] {condensed milk,           
##      long life bakery product, 
##      other vegetables,         
##      whole milk}               
## [6] {abrasive cleaner,         
##      butter,                   
##      rice,                     
##      whole milk,               
##      yogurt}
# Mine association rules
rules <- apriori(basket_df, parameter = list(supp = 0.01, conf = 0.5))
## Apriori
## 
## Parameter specification:
##  confidence minval smax arem  aval originalSupport maxtime support minlen
##         0.5    0.1    1 none FALSE            TRUE       5    0.01      1
##  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: 98 
## 
## set item appearances ...[0 item(s)] done [0.00s].
## set transactions ...[169 item(s), 9835 transaction(s)] done [0.00s].
## sorting and recoding items ... [88 item(s)] done [0.00s].
## creating transaction tree ... done [0.00s].
## checking subsets of size 1 2 3 4 done [0.00s].
## writing ... [15 rule(s)] done [0.00s].
## creating S4 object  ... done [0.00s].
# Inspect summary of the rules
summary(rules)
## set of 15 rules
## 
## rule length distribution (lhs + rhs):sizes
##  3 
## 15 
## 
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##       3       3       3       3       3       3 
## 
## summary of quality measures:
##     support          confidence        coverage            lift      
##  Min.   :0.01007   Min.   :0.5000   Min.   :0.01729   Min.   :1.984  
##  1st Qu.:0.01174   1st Qu.:0.5151   1st Qu.:0.02089   1st Qu.:2.036  
##  Median :0.01230   Median :0.5245   Median :0.02430   Median :2.203  
##  Mean   :0.01316   Mean   :0.5411   Mean   :0.02454   Mean   :2.299  
##  3rd Qu.:0.01403   3rd Qu.:0.5718   3rd Qu.:0.02598   3rd Qu.:2.432  
##  Max.   :0.02227   Max.   :0.5862   Max.   :0.04342   Max.   :3.030  
##      count      
##  Min.   : 99.0  
##  1st Qu.:115.5  
##  Median :121.0  
##  Mean   :129.4  
##  3rd Qu.:138.0  
##  Max.   :219.0  
## 
## mining info:
##       data ntransactions support confidence
##  basket_df          9835    0.01        0.5
##                                                                  call
##  apriori(data = basket_df, parameter = list(supp = 0.01, conf = 0.5))
# Sort and extract the top 10 rules by lift
top_rules <- sort(rules, by = "lift")[1:10]

# Display the top rules in an interactive table
DT::datatable(
  inspect(top_rules),
  options = list(scrollX = TRUE,
                 dom = 'lBfrtip',
                 paging = FALSE,
                 searching = FALSE),
  rownames = FALSE,
  caption = htmltools::tags$caption(
    style = 'caption-side: top; text-align: left; font-size: 16px; font-weight: bold;',
    'Top 10 Rules (by Lift)'
  )
)
##      lhs                                  rhs                support   
## [1]  {citrus fruit, root vegetables}   => {other vegetables} 0.01037112
## [2]  {root vegetables, tropical fruit} => {other vegetables} 0.01230300
## [3]  {rolls/buns, root vegetables}     => {other vegetables} 0.01220132
## [4]  {root vegetables, yogurt}         => {other vegetables} 0.01291307
## [5]  {curd, yogurt}                    => {whole milk}       0.01006609
## [6]  {butter, other vegetables}        => {whole milk}       0.01148958
## [7]  {root vegetables, tropical fruit} => {whole milk}       0.01199797
## [8]  {root vegetables, yogurt}         => {whole milk}       0.01453991
## [9]  {domestic eggs, other vegetables} => {whole milk}       0.01230300
## [10] {whipped/sour cream, yogurt}      => {whole milk}       0.01087951
##      confidence coverage   lift     count
## [1]  0.5862069  0.01769192 3.029608 102  
## [2]  0.5845411  0.02104728 3.020999 121  
## [3]  0.5020921  0.02430097 2.594890 120  
## [4]  0.5000000  0.02582613 2.584078 127  
## [5]  0.5823529  0.01728521 2.279125  99  
## [6]  0.5736041  0.02003050 2.244885 113  
## [7]  0.5700483  0.02104728 2.230969 118  
## [8]  0.5629921  0.02582613 2.203354 143  
## [9]  0.5525114  0.02226741 2.162336 121  
## [10] 0.5245098  0.02074225 2.052747 107
# Visualize the top rules as a graph
plot(top_rules, method = "graph", engine = "htmlwidget")

2. Cluster analysis

For the cluster analysis, we had to transform dataset to a binary matrix with rows as transactions, columns as items, each cell was 1 (purchased) or 0 (not purchased). We used 5 clusters (centers=5) and 20 random initializations (nstart=20):
Cluster 1: 1,349 transactions
Cluster 2: 780 transactions
Cluster 3: 4,952 transactions
Cluster 4: 1,373 transactions
Cluster 5: 1,381 transactions

The top five items for each cluster:
Cluster 1: soda, rolls/buns, bottled water, whole milk, shopping bags (quick purchases for daily needs)
Cluster 2: whole milk, yogurt, other vegetables, root vegetables, tropical fruit (health-conscious buying)
Cluster 3: rolls/buns, canned beer, yogurt, bottled water, shopping bags (beverages and snacks)
Cluster 4: whole milk, rolls/buns, root vegetables, yogurt, bottled water (dairy goods, fresh produce)
Cluster 5: other vegetables, whole milk, rolls/buns, root vegetables, soda (fresh produce with beverages)

The clusters were visualized with the fviz_cluster(), clusters overlap, as they supposed to for high-dimensional data. Cluster 1 (red) indicates a strong desire for necessary commodities such as soda and rolls/buns. Cluster 2 (green) focuses on health-conscious purchases including fresh veggies and dairy. Cluster 3 (blue) represents clients who prefer beverages and quick food. Cluster 4 (purple) identifies shoppers who prioritize staple foods and fresh produce. Cluster 5 (pink) attracts customers interested in premium produce and occasional indulgences such as soda.

Based on the analysis, we can tailor promotions to target certain groups:
For Cluster 1, provide discounts for soda and bottled water, bundle deals with rolls/buns, shopping bags.
For Cluster 2, promote healthy foods such as yogurt and tropical fruit, bundle fresh root veggies with dairy goods.
For Cluster 3, offer discounts on canned beer, complement advertising with bottled drinks, rolls/buns.
For Cluster 4, bundles dairy products (whole milk and yogurt) with fresh root vegetables.
For Cluster 5, combine vegetables and fruits with occasional beverages such as soda.

set.seed(547)
#Binary matrix items vs. transactions
cluster_matrix <- as(basket_df, "matrix")

#k-means clustering
k_means <- kmeans(cluster_matrix, centers = 5, nstart = 20)
print(k_means)
## K-means clustering with 5 clusters of sizes 1349, 780, 4952, 1373, 1381
## 
## Cluster means:
##   abrasive cleaner artif. sweetener baby cosmetics   baby food         bags
## 1      0.001482580      0.002223870   0.0014825797 0.000000000 0.0000000000
## 2      0.015384615      0.005128205   0.0012820513 0.001282051 0.0000000000
## 3      0.001615509      0.003029079   0.0004038772 0.000000000 0.0006058158
## 4      0.003641661      0.002184996   0.0000000000 0.000000000 0.0007283321
## 5      0.005792904      0.005068791   0.0007241130 0.000000000 0.0000000000
##   baking powder bathroom cleaner       beef    berries  beverages bottled beer
## 1   0.008895478     0.0044477391 0.02742772 0.03335804 0.02446256   0.09266123
## 2   0.069230769     0.0102564103 0.16538462 0.10897436 0.02948718   0.10512821
## 3   0.008885299     0.0018174475 0.03210824 0.02241519 0.02584814   0.07915994
## 4   0.023306628     0.0007283321 0.05899490 0.02694829 0.02767662   0.06482156
## 5   0.023171615     0.0021723389 0.07965243 0.03548154 0.02461984   0.07530775
##   bottled water      brandy brown bread     butter butter milk    cake bar
## 1    0.16382506 0.004447739  0.05337287 0.03558191  0.02075612 0.025203855
## 2    0.21025641 0.001282051  0.16153846 0.22692308  0.08717949 0.032051282
## 3    0.08400646 0.005048465  0.04563813 0.02827141  0.01696284 0.006260097
## 4    0.10997815 0.002913328  0.08157320 0.07428988  0.02986162 0.014566642
## 5    0.09775525 0.003620565  0.07385952 0.05648081  0.03910210 0.014482259
##       candles      candy canned beer canned fish canned fruit canned vegetables
## 1 0.005930319 0.03928836  0.08376575  0.01482580  0.001482580       0.011860638
## 2 0.015384615 0.06153846  0.03717949  0.02948718  0.008974359       0.038461538
## 3 0.008077544 0.02504039  0.10601777  0.01090468  0.002019386       0.005048465
## 4 0.009468318 0.02330663  0.02403496  0.01238165  0.004369993       0.005826657
## 5 0.010861694 0.02679218  0.04634323  0.02461984  0.005068791       0.019551050
##     cat food     cereals chewing gum    chicken  chocolate
## 1 0.02520385 0.002223870  0.03558191 0.03113417 0.06375093
## 2 0.06794872 0.028205128  0.02179487 0.13589744 0.12692308
## 3 0.01635703 0.002221325  0.01817447 0.02403069 0.03634895
## 4 0.02476329 0.007283321  0.01456664 0.04078660 0.04151493
## 5 0.01955105 0.007241130  0.02317161 0.07168718 0.04779146
##   chocolate marshmallow citrus fruit     cleaner cling film/bags cocoa drinks
## 1           0.009636768   0.05485545 0.004447739     0.011860638  0.001482580
## 2           0.020512821   0.26282051 0.020512821     0.017948718  0.007692308
## 3           0.006462036   0.05492730 0.003432956     0.008279483  0.001009693
## 4           0.013109978   0.08230153 0.005098325     0.012381646  0.005826657
## 5           0.007241130   0.10861694 0.002896452     0.017378711  0.000724113
##       coffee condensed milk cooking chocolate     cookware       cream
## 1 0.04966642    0.008154188       0.002223870 0.0029651594 0.000000000
## 2 0.10512821    0.016666667       0.007692308 0.0064102564 0.005128205
## 3 0.05270598    0.009491115       0.001817447 0.0030290792 0.001009693
## 4 0.06336489    0.008739985       0.002913328 0.0007283321 0.000000000
## 5 0.05358436    0.013034033       0.002172339 0.0014482259 0.002896452
##   cream cheese       curd curd cheese  decalcifier dental care    dessert
## 1   0.02594514 0.03706449 0.000000000 0.0007412898 0.003706449 0.04373610
## 2   0.14230769 0.20384615 0.017948718 0.0064102564 0.014102564 0.11153846
## 3   0.02382876 0.02907916 0.003634895 0.0012116317 0.004240711 0.02302100
## 4   0.04442826 0.06627822 0.005098325 0.0007283321 0.005098325 0.03714494
## 5   0.04706734 0.05792904 0.007965243 0.0014482259 0.009413469 0.03910210
##    detergent dish cleaner      dishes    dog food domestic eggs
## 1 0.01408451  0.012601927 0.005189029 0.011119348    0.04521868
## 2 0.05000000  0.024358974 0.028205128 0.019230769    0.20769231
## 3 0.01191438  0.008683360 0.015953150 0.006462036    0.03412763
## 4 0.02694829  0.008011653 0.015294975 0.005826657    0.08739985
## 5 0.02534395  0.009413469 0.031860970 0.010137581    0.08110065
##   female sanitary products finished products        fish       flour
## 1              0.008895478       0.006671609 0.001482580 0.011119348
## 2              0.012820513       0.012820513 0.006410256 0.066666667
## 3              0.004846527       0.005856220 0.002625202 0.009693053
## 4              0.005826657       0.002913328 0.002913328 0.021121631
## 5              0.004344678       0.008689356 0.003620565 0.019551050
##   flower (seeds) flower soil/fertilizer frankfurter frozen chicken
## 1    0.007412898            0.001482580  0.05040771   0.0007412898
## 2    0.014102564            0.001282051  0.15128205   0.0012820513
## 3    0.006663974            0.002625202  0.04422456   0.0006058158
## 4    0.013838310            0.001456664  0.06190823   0.0007283321
## 5    0.020999276            0.000724113  0.06517017   0.0000000000
##   frozen dessert frozen fish frozen fruits frozen meals frozen potato products
## 1    0.010378058 0.002965159  0.0014825797   0.02816901            0.013343217
## 2    0.033333333 0.034615385  0.0051282051   0.07435897            0.020512821
## 3    0.007471729 0.008481422  0.0004038772   0.02261712            0.005048465
## 4    0.008739985 0.010924982  0.0000000000   0.02476329            0.006554989
## 5    0.012309920 0.019551050  0.0028964518   0.02679218            0.010861694
##   frozen vegetables fruit/vegetable juice     grapes   hair spray        ham
## 1        0.03335804            0.09117865 0.01927354 0.0007412898 0.02001483
## 2        0.15256410            0.21794872 0.06794872 0.0000000000 0.08589744
## 3        0.02827141            0.04644588 0.01474152 0.0012116317 0.01575121
## 4        0.05389658            0.07137655 0.01747997 0.0014566642 0.02621996
## 5        0.06879073            0.06517017 0.03186097 0.0014482259 0.03475742
##   hamburger meat hard cheese       herbs        honey house keeping products
## 1     0.02742772  0.01630838 0.007412898 0.0007412898            0.006671609
## 2     0.09615385  0.08333333 0.057692308 0.0025641026            0.033333333
## 3     0.01575121  0.01352989 0.007673667 0.0004038772            0.005048465
## 4     0.03932993  0.02767662 0.017479971 0.0065549891            0.009468318
## 5     0.06010138  0.03548154 0.031136857 0.0007241130            0.006517017
##   hygiene articles  ice cream instant coffee Instant food products         jam
## 1       0.03706449 0.03261675    0.010378058           0.008895478 0.004447739
## 2       0.09102564 0.03846154    0.023076923           0.021794872 0.019230769
## 3       0.02201131 0.02504039    0.005856220           0.005048465 0.003029079
## 4       0.03058995 0.01602331    0.002184996           0.005826657 0.007283321
## 5       0.03765387 0.01882694    0.006517017           0.012309920 0.005068791
##       ketchup kitchen towels kitchen utensil light bulbs      liqueur
## 1 0.004447739    0.005930319    0.0000000000 0.002965159 0.0007412898
## 2 0.017948718    0.017948718    0.0038461538 0.006410256 0.0012820513
## 3 0.002423263    0.003029079    0.0002019386 0.004240711 0.0010096931
## 4 0.003641661    0.005826657    0.0000000000 0.002184996 0.0007283321
## 5 0.003620565    0.010137581    0.0000000000 0.005792904 0.0007241130
##        liquor liquor (appetizer)  liver loaf long life bakery product
## 1 0.013343217        0.014084507 0.005189029               0.03706449
## 2 0.005128205        0.008974359 0.011538462               0.11282051
## 3 0.015145396        0.007471729 0.002625202               0.02806947
## 4 0.001456664        0.005098325 0.007283321               0.03058995
## 5 0.007241130        0.005792904 0.007965243               0.03548154
##   make up remover male cosmetics  margarine  mayonnaise       meat meat spreads
## 1    0.0022238695    0.005930319 0.04892513 0.011860638 0.02446256  0.006671609
## 2    0.0012820513    0.002564103 0.15000000 0.028205128 0.06666667  0.010256410
## 3    0.0006058158    0.005048465 0.03554120 0.005048465 0.01433764  0.003634895
## 4    0.0007283321    0.002184996 0.07064822 0.007283321 0.02694829  0.002913328
## 5    0.0000000000    0.005068791 0.08689356 0.012309920 0.04417089  0.002172339
##   misc. beverages     mustard    napkins newspapers    nut snack nuts/prunes
## 1      0.04002965 0.014084507 0.05707932 0.06671609 0.0059303188 0.003706449
## 2      0.03846154 0.026923077 0.15512821 0.13974359 0.0051282051 0.006410256
## 3      0.02746365 0.007471729 0.03513732 0.06502423 0.0026252019 0.002625202
## 4      0.01820830 0.016751639 0.05025492 0.10560816 0.0007283321 0.002184996
## 5      0.02461984 0.013034033 0.05358436 0.08616944 0.0036205648 0.005068791
##          oil     onions organic products organic sausage other vegetables
## 1 0.02149741 0.01779096      0.001482580     0.002965159      0.004447739
## 2 0.07564103 0.10769231      0.003846154     0.006410256      0.661538462
## 3 0.01797254 0.01817447      0.001009693     0.001211632      0.000000000
## 4 0.03423161 0.02476329      0.002184996     0.003641661      0.000000000
## 5 0.03765387 0.05286025      0.002172339     0.001448226      1.000000000
##   packaged fruit/vegetables       pasta     pastry    pet care  photo/film
## 1               0.008895478 0.019273536 0.10378058 0.011860638 0.005930319
## 2               0.024358974 0.043589744 0.19871795 0.016666667 0.008974359
## 3               0.011712439 0.008885299 0.06381260 0.008077544 0.011510501
## 4               0.011653314 0.016751639 0.10050983 0.008739985 0.010196650
## 5               0.016654598 0.015206372 0.09123823 0.008689356 0.003620565
##   pickled vegetables  pip fruit     popcorn       pork pot plants
## 1        0.014825797 0.05263158 0.010378058 0.05337287 0.01482580
## 2        0.041025641 0.28333333 0.015384615 0.14230769 0.03717949
## 3        0.009693053 0.04826333 0.005048465 0.03432956 0.01413570
## 4        0.021849964 0.07210488 0.009468318 0.05535324 0.01893664
## 5        0.033309196 0.08254888 0.005068791 0.09992759 0.01810282
##   potato products preservation products processed cheese    prosecco
## 1     0.002223870           0.000000000      0.022979985 0.002223870
## 2     0.012820513           0.001282051      0.051282051 0.001282051
## 3     0.001817447           0.000000000      0.008279483 0.002019386
## 4     0.002913328           0.000000000      0.016023307 0.002184996
## 5     0.001448226           0.000724113      0.020999276 0.002172339
##   pudding powder  ready soups red/blush wine        rice roll products
## 1    0.002223870 0.0029651594    0.023721275 0.001482580   0.005930319
## 2    0.008974359 0.0064102564    0.025641026 0.038461538   0.039743590
## 3    0.001009693 0.0008077544    0.018578352 0.003029079   0.004846527
## 4    0.003641661 0.0021849964    0.008739985 0.010196650   0.010196650
## 5    0.002172339 0.0014482259    0.023895728 0.010137581   0.017378711
##   rolls/buns root vegetables rubbing alcohol         rum salad dressing
## 1  0.1994070      0.06300964    0.0000000000 0.003706449   0.0007412898
## 2  0.3435897      0.43076923    0.0051282051 0.007692308   0.0025641026
## 3  0.1512520      0.05149435    0.0006058158 0.002827141   0.0004038772
## 4  0.2032047      0.11070648    0.0014566642 0.005826657   0.0000000000
## 5  0.1766836      0.17668356    0.0007241130 0.007965243   0.0021723389
##          salt salty snack      sauces    sausage seasonal products
## 1 0.007412898  0.04595997 0.005189029 0.11415864       0.011860638
## 2 0.024358974  0.07307692 0.010256410 0.24230769       0.034615385
## 3 0.007471729  0.02948304 0.003836834 0.06441842       0.013933764
## 4 0.012381646  0.03058995 0.006554989 0.08230153       0.006554989
## 5 0.016654598  0.04706734 0.007965243 0.10789283       0.013758146
##   semi-finished bread shopping bags   skin care sliced cheese snack products
## 1          0.01556709    0.13417346 0.003706449    0.02149741    0.005189029
## 2          0.05128205    0.12948718 0.011538462    0.09615385    0.003846154
## 3          0.01352989    0.08400646 0.002019386    0.01312601    0.002221325
## 4          0.01675164    0.07793154 0.002913328    0.02257830    0.002184996
## 5          0.01665460    0.11875453 0.005068791    0.02968863    0.004344678
##          soap      soda soft cheese    softener sound storage medium
## 1 0.005189029 1.0000000 0.006671609 0.006671609         0.0007412898
## 2 0.003846154 0.2102564 0.079487179 0.012820513         0.0000000000
## 3 0.001615509 0.0000000 0.008683360 0.003029079         0.0000000000
## 4 0.003641661 0.0000000 0.018936635 0.007283321         0.0000000000
## 5 0.002172339 0.1462708 0.020275163 0.007241130         0.0000000000
##         soups sparkling wine specialty bar specialty cheese specialty chocolate
## 1 0.005189029    0.004447739    0.04002965      0.010378058          0.03335804
## 2 0.025641026    0.006410256    0.03076923      0.033333333          0.04487179
## 3 0.003231018    0.005654281    0.02625202      0.003029079          0.02827141
## 4 0.007283321    0.003641661    0.01675164      0.005098325          0.02694829
## 5 0.010137581    0.007965243    0.02751629      0.015930485          0.03041274
##   specialty fat specialty vegetables      spices spread cheese      sugar
## 1   0.002223870         0.0029651594 0.001482580   0.015567087 0.02742772
## 2   0.008974359         0.0051282051 0.016666667   0.026923077 0.09615385
## 3   0.003432956         0.0008077544 0.003836834   0.008279483 0.02241519
## 4   0.002184996         0.0007283321 0.004369993   0.008739985 0.04005827
## 5   0.004344678         0.0028964518 0.007965243   0.010861694 0.03982621
##   sweet spreads       syrup         tea     tidbits toilet cleaner
## 1   0.010378058 0.003706449 0.000000000 0.005930319   0.0007412898
## 2   0.023076923 0.007692308 0.014102564 0.005128205   0.0000000000
## 3   0.005654281 0.002625202 0.002423263 0.001009693   0.0006058158
## 4   0.008011653 0.001456664 0.004369993 0.003641661   0.0007283321
## 5   0.013034033 0.004344678 0.006517017 0.000724113   0.0014482259
##   tropical fruit      turkey   UHT-milk     vinegar    waffles
## 1     0.08154188 0.003706449 0.04151223 0.002223870 0.04670126
## 2     0.39487179 0.034615385 0.05256410 0.020512821 0.08974359
## 3     0.06381260 0.004240711 0.03251212 0.004644588 0.02806947
## 4     0.10342316 0.005826657 0.01383831 0.007283321 0.03787327
## 5     0.11296162 0.013758146 0.03765387 0.008689356 0.03910210
##   whipped/sour cream      whisky white bread  white wine whole milk     yogurt
## 1         0.04002965 0.000000000  0.03558191 0.021497405  0.1564122 0.11415864
## 2         0.31923077 0.001282051  0.12435897 0.008974359  0.7628205 0.66666667
## 3         0.03675283 0.001211632  0.02483845 0.023828756  0.0000000 0.08663166
## 4         0.07283321 0.000000000  0.05025492 0.010196650  1.0000000 0.11070648
## 5         0.08689356 0.000724113  0.05575670 0.013758146  0.2418537 0.08472122
##      zwieback
## 1 0.003706449
## 2 0.014102564
## 3 0.007067851
## 4 0.004369993
## 5 0.007965243
## 
## Clustering vector:
##    [1] 3 3 4 3 5 4 3 5 3 4 5 2 3 1 3 3 3 3 3 3 5 3 4 3 5 3 3 1 5 1 3 5 5 5 3 1 3
##   [38] 3 5 3 1 2 3 3 1 3 3 3 3 2 3 3 5 5 1 4 3 3 3 3 5 3 4 3 1 4 3 3 4 4 3 4 4 1
##   [75] 3 5 4 3 1 3 3 4 3 3 3 3 3 5 3 1 3 3 3 3 3 3 3 5 4 3 1 1 3 4 1 3 3 1 3 3 5
##  [112] 3 4 3 3 4 4 5 1 5 3 3 1 5 3 2 3 3 3 3 3 4 3 1 3 5 1 3 3 3 4 5 4 4 3 3 2 1
##  [149] 3 3 5 3 3 5 2 3 3 1 5 3 4 1 3 3 5 1 4 4 3 5 2 5 3 3 1 4 4 3 3 5 4 5 5 1 3
##  [186] 2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 4 3 2 5 5 3 4 5 3 3 4 3 3 3 3 5 4 4 3 2 5 3 1 5 1 1 3 3 3 3 5 3 3 3 3 3
## [9695] 3 3 3 4 4 3 4 4 3 4 5 3 3 4 3 3 3 4 3 3 2 1 3 5 4 3 3 3 3 5 3 2 4 3 3 5 3
## [9732] 3 4 3 2 3 3 3 1 3 2 3 5 5 2 3 4 1 1 3 3 2 4 2 3 3 3 4 3 4 4 3 3 3 3 4 5 5
## [9769] 2 1 3 1 3 5 3 3 5 4 4 1 4 4 3 4 1 3 3 3 4 1 3 2 2 3 4 3 2 3 3 5 5 1 2 5 3
## [9806] 3 4 3 3 5 1 5 3 4 4 3 3 2 3 2 3 2 3 3 3 5 5 2 1 5 2 3 2 1 5
## 
## Within cluster sum of squares by cluster:
## [1]  4727.437  6816.337 12745.130  4746.715  6037.005
##  (between_SS / total_SS =  11.8 %)
## 
## Available components:
## 
## [1] "cluster"      "centers"      "totss"        "withinss"     "tot.withinss"
## [6] "betweenss"    "size"         "iter"         "ifault"
#Cluster sizes
k_means$size
## [1] 1349  780 4952 1373 1381
#Top 5 items for each cluster
cluster_centers <- as.data.frame(k_means$centers)
row1 <- as.numeric(cluster_centers[1, ])
names(row1) <- colnames(cluster_centers)
head(sort(row1, decreasing = TRUE), 5)
##          soda    rolls/buns bottled water    whole milk shopping bags 
##     1.0000000     0.1994070     0.1638251     0.1564122     0.1341735
row2 <- as.numeric(cluster_centers[2, ])
names(row2) <- colnames(cluster_centers)
head(sort(row2, decreasing = TRUE), 5)
##       whole milk           yogurt other vegetables  root vegetables 
##        0.7628205        0.6666667        0.6615385        0.4307692 
##   tropical fruit 
##        0.3948718
row3 <- as.numeric(cluster_centers[3, ])
names(row3) <- colnames(cluster_centers)
head(sort(row3, decreasing = TRUE), 5)
##    rolls/buns   canned beer        yogurt bottled water shopping bags 
##    0.15125202    0.10601777    0.08663166    0.08400646    0.08400646
row4 <- as.numeric(cluster_centers[4, ])
names(row4) <- colnames(cluster_centers)
head(sort(row4, decreasing = TRUE), 5)
##      whole milk      rolls/buns root vegetables          yogurt   bottled water 
##       1.0000000       0.2032047       0.1107065       0.1107065       0.1099782
row5 <- as.numeric(cluster_centers[5, ])
names(row5) <- colnames(cluster_centers)
head(sort(row5, decreasing = TRUE), 5)
## other vegetables       whole milk       rolls/buns  root vegetables 
##        1.0000000        0.2418537        0.1766836        0.1766836 
##             soda 
##        0.1462708
#Visualize the clusters
fviz_cluster(k_means, data = cluster_matrix,
             geom = "point", stand = FALSE,
             ellipse.type = "convex", ggtheme = theme_minimal(),
             main = "Cluster Analysis of Transactions")