data > opinion

Tom Alby

5 Warenkorbanalyse


Sie sind hier: start / lehrveranstaltungen / datenanalyse data science machine learning / 05 warenkorbanalyse /

Association Rules

Der apriori-Algorithmus

Association Rules werden für eine Warenkorbanalyse verwendet. Die Ergebnisse solcher Analysen sind bekannt aus Shops, in denen bei der Auswahl eines Artikels Empfehlungen wie “Kunden, die diesen Artikel gekauft haben, haben auch diesen Artikel gekauft.” Wir der Name schon sagt wird ein solcher Zusammenhang hier “Assoziation” genannt.

Das Package arules enthält den apriori-Algorithmus, ein Verfahren zur Assoziationsanalyse aus dem Data Mining. Mithilfe dieses Algorithmus werden Zusammenhänge in transaktionsbasierten Datenbanken identifiziert; diese Zusammenhänge werden in sogenannten Assoziationsregeln dargestellt. Der apriori-Algorithmus ist ein spezieller Ansatz, bei dem selten auftauchende Items ignoriert werden, aber auch die Transaktionen, in denen dieses seltene Item auftaucht. Dadurch wird der Umfang der durchzurechnenden Daten reduziert. Denn sobald die Datenmengen größer werden, kommt der Arbeitsspeicher wieder ins Spiel.

Stellen wir uns einmal vor, dass in 10% aller Einkäufe Bier gekauft wird und in 7% der Einkäufe Kartoffelchips. Schauen wir uns nur die Bierkäufe an und in diesen Käufen kommen Kartoffelchips auch nur zu 7% vor, dann gibt es hier keinen Zusammenhang. Werden aber bei allen Bier-Käufen zu 25% auch Kartoffelchips gekauft, dann scheint es hier eine Assoziation zu geben. Eine Assoziation ist nicht auf zwei Produkte beschränkt; so kann es sein, dass Bier mit Kartoffelchips, Wein und Käsewürfeln assoziiert ist. Diese Assoziationen müssen nicht immer stark sein.

Wir starten zunächst mit einem ganz einfachen, selbst konstruierten Beispiel, damit alle Berechnungen nachvollzogen werden können.

library(arules)
## Lade nötiges Paket: Matrix
## 
## Attache Paket: 'arules'
## The following objects are masked from 'package:base':
## 
##     abbreviate, write
a_list <- list( # Die Beispiel-Daten, jede Zeile hier ist sozusagen ein Kassenbon
      c("apfel", "bier", "reis", "huhn"),
      c("apfel", "bier", "reis"),
      c("apfel", "bier"),
      c("apfel", "birne"),
      c("milch", "bier", "reis", "huhn"),
      c("milch", "bier", "reis"),
      c("milch", "bier"),
      c("apfel", "birne")
      )

## Jeder Transaktion wird ein Name gegeben
names(a_list) <- paste("Tr",c(1:8), sep = "")
a_list
## $Tr1
## [1] "apfel" "bier"  "reis"  "huhn" 
## 
## $Tr2
## [1] "apfel" "bier"  "reis" 
## 
## $Tr3
## [1] "apfel" "bier" 
## 
## $Tr4
## [1] "apfel" "birne"
## 
## $Tr5
## [1] "milch" "bier"  "reis"  "huhn" 
## 
## $Tr6
## [1] "milch" "bier"  "reis" 
## 
## $Tr7
## [1] "milch" "bier" 
## 
## $Tr8
## [1] "apfel" "birne"
## Umwandlung in das Transactions-Format
trans <- as(a_list, "transactions")

Die Speicherung in der Struktur transactions ist die Voraussetzung, um den apriori-Algorithmus auf den Daten laufen zu lassen. Hierbei wird Speicher gespart.

trans
## transactions in sparse format with
##  8 transactions (rows) and
##  6 items (columns)
as(trans,"matrix")
##     apfel  bier birne  huhn milch  reis
## Tr1  TRUE  TRUE FALSE  TRUE FALSE  TRUE
## Tr2  TRUE  TRUE FALSE FALSE FALSE  TRUE
## Tr3  TRUE  TRUE FALSE FALSE FALSE FALSE
## Tr4  TRUE FALSE  TRUE FALSE FALSE FALSE
## Tr5 FALSE  TRUE FALSE  TRUE  TRUE  TRUE
## Tr6 FALSE  TRUE FALSE FALSE  TRUE  TRUE
## Tr7 FALSE  TRUE FALSE FALSE  TRUE FALSE
## Tr8  TRUE FALSE  TRUE FALSE FALSE FALSE

Im folgenden Schritt werden die Regeln “gemined”, die Erklärungen dazu folgen gleich:

trans.rules <- apriori(trans, parameter=list(supp=0.01, conf=0.3, 
                                                target="rules"))
## Apriori
## 
## Parameter specification:
##  confidence minval smax arem  aval originalSupport maxtime support minlen
##         0.3    0.1    1 none FALSE            TRUE       5    0.01      1
##  maxlen target   ext
##      10  rules FALSE
## 
## Algorithmic control:
##  filter tree heap memopt load sort verbose
##     0.1 TRUE TRUE  FALSE TRUE    2    TRUE
## 
## Absolute minimum support count: 0 
## 
## set item appearances ...[0 item(s)] done [0.00s].
## set transactions ...[6 item(s), 8 transaction(s)] done [0.00s].
## sorting and recoding items ... [6 item(s)] done [0.00s].
## creating transaction tree ... done [0.00s].
## checking subsets of size 1 2 3 4 done [0.00s].
## writing ... [52 rule(s)] done [0.00s].
## creating S4 object  ... done [0.00s].

Nun schauen wir uns diese Regeln einmal an:

inspect(subset(trans.rules))
##      lhs                  rhs     support confidence lift     count
## [1]  {}                => {milch} 0.375   0.3750000  1.000000 3    
## [2]  {}                => {apfel} 0.625   0.6250000  1.000000 5    
## [3]  {}                => {reis}  0.500   0.5000000  1.000000 4    
## [4]  {}                => {bier}  0.750   0.7500000  1.000000 6    
## [5]  {birne}           => {apfel} 0.250   1.0000000  1.600000 2    
## [6]  {apfel}           => {birne} 0.250   0.4000000  1.600000 2    
## [7]  {huhn}            => {milch} 0.125   0.5000000  1.333333 1    
## [8]  {milch}           => {huhn}  0.125   0.3333333  1.333333 1    
## [9]  {huhn}            => {apfel} 0.125   0.5000000  0.800000 1    
## [10] {huhn}            => {reis}  0.250   1.0000000  2.000000 2    
## [11] {reis}            => {huhn}  0.250   0.5000000  2.000000 2    
## [12] {huhn}            => {bier}  0.250   1.0000000  1.333333 2    
## [13] {bier}            => {huhn}  0.250   0.3333333  1.333333 2    
## [14] {milch}           => {reis}  0.250   0.6666667  1.333333 2    
## [15] {reis}            => {milch} 0.250   0.5000000  1.333333 2    
## [16] {milch}           => {bier}  0.375   1.0000000  1.333333 3    
## [17] {bier}            => {milch} 0.375   0.5000000  1.333333 3    
## [18] {apfel}           => {reis}  0.250   0.4000000  0.800000 2    
## [19] {reis}            => {apfel} 0.250   0.5000000  0.800000 2    
## [20] {apfel}           => {bier}  0.375   0.6000000  0.800000 3    
## [21] {bier}            => {apfel} 0.375   0.5000000  0.800000 3    
## [22] {reis}            => {bier}  0.500   1.0000000  1.333333 4    
## [23] {bier}            => {reis}  0.500   0.6666667  1.333333 4    
## [24] {huhn,milch}      => {reis}  0.125   1.0000000  2.000000 1    
## [25] {huhn,reis}       => {milch} 0.125   0.5000000  1.333333 1    
## [26] {milch,reis}      => {huhn}  0.125   0.5000000  2.000000 1    
## [27] {huhn,milch}      => {bier}  0.125   1.0000000  1.333333 1    
## [28] {bier,huhn}       => {milch} 0.125   0.5000000  1.333333 1    
## [29] {bier,milch}      => {huhn}  0.125   0.3333333  1.333333 1    
## [30] {apfel,huhn}      => {reis}  0.125   1.0000000  2.000000 1    
## [31] {huhn,reis}       => {apfel} 0.125   0.5000000  0.800000 1    
## [32] {apfel,reis}      => {huhn}  0.125   0.5000000  2.000000 1    
## [33] {apfel,huhn}      => {bier}  0.125   1.0000000  1.333333 1    
## [34] {bier,huhn}       => {apfel} 0.125   0.5000000  0.800000 1    
## [35] {apfel,bier}      => {huhn}  0.125   0.3333333  1.333333 1    
## [36] {huhn,reis}       => {bier}  0.250   1.0000000  1.333333 2    
## [37] {bier,huhn}       => {reis}  0.250   1.0000000  2.000000 2    
## [38] {bier,reis}       => {huhn}  0.250   0.5000000  2.000000 2    
## [39] {milch,reis}      => {bier}  0.250   1.0000000  1.333333 2    
## [40] {bier,milch}      => {reis}  0.250   0.6666667  1.333333 2    
## [41] {bier,reis}       => {milch} 0.250   0.5000000  1.333333 2    
## [42] {apfel,reis}      => {bier}  0.250   1.0000000  1.333333 2    
## [43] {apfel,bier}      => {reis}  0.250   0.6666667  1.333333 2    
## [44] {bier,reis}       => {apfel} 0.250   0.5000000  0.800000 2    
## [45] {huhn,milch,reis} => {bier}  0.125   1.0000000  1.333333 1    
## [46] {bier,huhn,milch} => {reis}  0.125   1.0000000  2.000000 1    
## [47] {bier,huhn,reis}  => {milch} 0.125   0.5000000  1.333333 1    
## [48] {bier,milch,reis} => {huhn}  0.125   0.5000000  2.000000 1    
## [49] {apfel,huhn,reis} => {bier}  0.125   1.0000000  1.333333 1    
## [50] {apfel,bier,huhn} => {reis}  0.125   1.0000000  2.000000 1    
## [51] {bier,huhn,reis}  => {apfel} 0.125   0.5000000  0.800000 1    
## [52] {apfel,bier,reis} => {huhn}  0.125   0.5000000  2.000000 1

Jede Zeile hier stellt eine Assoziationsregel dar. In der fünften Zeile sehen wir die Assoziation von Birne und Apfel. Man könnte es so ausdrücken: Das Auftreten von Birne (lhs für left-hand side), wenn Apfel (rhs für right-hand side) auftritt. Eine Regel bedeutet übrigens keine Kausalität (wobei eine Assoziation von Wein und Korkenzieher dies mutmaßen lassen könnte).

Jede Regel kommt mit mehreren Metriken:

  • Support: Die Anzahl der Transaktionen mit dieser Item-Kombination geteilt durch alle Transaktionen, ungeachtet dessen, ob weitere Items in der Transaktion waren. Die Kombination {Milch,Bier} kommt drei Mal vor, einmal alleine, zwei Mal mit anderen Items.
  • Confidence: hat nichts mit der Konfidenz zu tun, die wir bereits bei dem Signifikanztest kennen gelernt haben. Hier geht es um den Support für das gleichzeitige Auftreten aller Items in einer Regel, bedingt nur durch den Support für das Left-hand Set. Dies wird so berechnet: \(confidence(X ⇒Y)=\frac{support(X ∩ Y)}{support(X)}\); in dem Beispiel für Apfel => Birne wäre das \(\frac{0,25}{0,625} = 0,4\). Dies könnte man so ausdrücken: Birnen tauchen in 40% der Fälle auf, wo auch Äpfel auftauchen.
  • Lift: Diese Metrik gibt an, wie viel häufiger ein Set auftaucht als wir erwarten würden, wenn die Items unabhängig voneinander wären. Berechnet wird der Lift wie folgt: \(lift(X ⇒Y) = \frac{support(X ∩ Y)}{(support(X) * support(Y))}\). Am Beispiel Apfel => Birne verdeutlicht: \(\frac{0,25}{(0,625 * 0,25)} = 1,6\). Die Kombination {Apfel, Birne} erscheint 1,6x häufiger als wir erwarten würde, wenn sie unabhängig voneinander wären.

Diese drei Metriken sind im Zusammenspiel wichtig, denn zum einen möchte man Items-Sets “minen”, die häufig genug auftauchen, dass sie auch geschäftlich sinnvoll sind. Zum andern möchte man eine starke Assoziation sehen, die in der Confidence abgebildet ist. Allerdings kann diese auch irreführend sein, wenn wir uns zum Beispiel die Items Apfel und Bier ansehen. Sie werden häufig zusammen gekauft, aber das kann auch einfach daran liegen, dass diese Items generell häufig gekauft werden. Diesen Effekt kann die Metrik Lift lindern.

Visualisierung von Association Rules

Zunächst wollen wir uns nur die Regeln ansehen, die einen besonders hohen Lift haben:

subrules <- head(trans.rules, n = 15, by = "lift")

Dann laden wir das Package arulesViz, das die Daten aus den Regeln visualisieren kann. Hier wählen wir die Methode “Graph” (die weiteren Methoden werden hier unterschlagen):

library(arulesViz)
## Lade nötiges Paket: grid
## Registered S3 method overwritten by 'seriation':
##   method         from 
##   reorder.hclust gclus
plot(subrules, method = "graph")

Was sehen wir hier? Zunächst einmal sehen wir die einzelnen Regeln, die sich aus Items und Verbindungen zusammensetzen. Von einem Item geht ein Pfeil auf einen Kreis, und von dem Kreis auf ein anderes Item. Je dunkler der Kreis, desto höher der Lift. Je größer der Kreis, desto höher der Support.

Association Rules mit dem Datensatz Groceries

Wir wollen das Gelernte nun auf einen größeren Datensatz anwenden. Netterweise bringt das Package apriori auch einen Datensatz mit, Groceries. Dieser enthält knapp 10.000 Transaktionen (Einkaufskörbe oder Kassenbons) und 169 Items (Produkte). Wir schauen uns davon die ersten fünf Zeilen an. In den Spalten sind alle Items, die der Laden zu bieten hat, in den Zeilen steht TRUE, wenn eines der Items gekauft wurde.

data("Groceries")

Auch hier erstellen wir wieder Assoziations-Regeln; es empfiehlt sich, etwas mit den Parametern Support und Confidence “herumzuspielen”, um interessante Regeln zu “minen”.

groc.rules <- apriori(Groceries, parameter=list(supp=0.01, conf=0.1, 
                                                target="rules"))
## Apriori
## 
## Parameter specification:
##  confidence minval smax arem  aval originalSupport maxtime support minlen
##         0.1    0.1    1 none FALSE            TRUE       5    0.01      1
##  maxlen target   ext
##      10  rules FALSE
## 
## 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 ... [435 rule(s)] done [0.00s].
## creating S4 object  ... done [0.00s].

Und schauen uns dann diese Regeln an:

my_rules <- inspect(subset(groc.rules, lift > 3))
##     lhs                                  rhs                  support   
## [1] {beef}                            => {root vegetables}    0.01738688
## [2] {root vegetables}                 => {beef}               0.01738688
## [3] {whole milk,yogurt}               => {curd}               0.01006609
## [4] {other vegetables,yogurt}         => {whipped/sour cream} 0.01016777
## [5] {citrus fruit,root vegetables}    => {other vegetables}   0.01037112
## [6] {citrus fruit,other vegetables}   => {root vegetables}    0.01037112
## [7] {tropical fruit,root vegetables}  => {other vegetables}   0.01230300
## [8] {tropical fruit,other vegetables} => {root vegetables}    0.01230300
##     confidence lift     count
## [1] 0.3313953  3.040367 171  
## [2] 0.1595149  3.040367 171  
## [3] 0.1796733  3.372304  99  
## [4] 0.2341920  3.267062 100  
## [5] 0.5862069  3.029608 102  
## [6] 0.3591549  3.295045 102  
## [7] 0.5845411  3.020999 121  
## [8] 0.3427762  3.144780 121
library(tidyverse)
## ── Attaching packages ───────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.2.1     ✓ purrr   0.3.3
## ✓ tibble  2.1.3     ✓ dplyr   0.8.3
## ✓ tidyr   1.0.0     ✓ stringr 1.4.0
## ✓ readr   1.3.1     ✓ forcats 0.4.0
## ── Conflicts ──────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## x tidyr::expand() masks Matrix::expand()
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
## x tidyr::pack()   masks Matrix::pack()
## x dplyr::recode() masks arules::recode()
## x tidyr::unpack() masks Matrix::unpack()
myRules_Direct <- as(groc.rules, "data.frame");
myRules_Direct %>%
  filter(lift > 1.1) %>%
  arrange(desc(lift))
##                                                        rules    support
## 1                              {whole milk,yogurt} => {curd} 0.01006609
## 2       {citrus fruit,other vegetables} => {root vegetables} 0.01037112
## 3          {other vegetables,yogurt} => {whipped/sour cream} 0.01016777
## 4     {tropical fruit,other vegetables} => {root vegetables} 0.01230300
## 5                                {root vegetables} => {beef} 0.01738688
## 6                                {beef} => {root vegetables} 0.01738688
## 7       {citrus fruit,root vegetables} => {other vegetables} 0.01037112
## 8     {tropical fruit,root vegetables} => {other vegetables} 0.01230300
## 9         {other vegetables,whole milk} => {root vegetables} 0.02318251
## 10                 {other vegetables,whole milk} => {butter} 0.01148958
## 11                             {whole milk,curd} => {yogurt} 0.01006609
## 12                            {whipped/sour cream} => {curd} 0.01047280
## 13                            {curd} => {whipped/sour cream} 0.01047280
## 14     {other vegetables,whole milk} => {whipped/sour cream} 0.01464159
## 15            {other vegetables,yogurt} => {root vegetables} 0.01291307
## 16               {whole milk,yogurt} => {whipped/sour cream} 0.01087951
## 17             {other vegetables,yogurt} => {tropical fruit} 0.01230300
## 18      {root vegetables,other vegetables} => {citrus fruit} 0.01037112
## 19        {other vegetables,rolls/buns} => {root vegetables} 0.01220132
## 20          {tropical fruit,whole milk} => {root vegetables} 0.01199797
## 21        {root vegetables,rolls/buns} => {other vegetables} 0.01220132
## 22          {other vegetables,whole milk} => {domestic eggs} 0.01230300
## 23            {root vegetables,yogurt} => {other vegetables} 0.01291307
## 24                   {whole milk,yogurt} => {tropical fruit} 0.01514997
## 25                           {tropical fruit} => {pip fruit} 0.02043721
## 26                           {pip fruit} => {tropical fruit} 0.02043721
## 27                   {tropical fruit,whole milk} => {yogurt} 0.01514997
## 28                          {butter} => {whipped/sour cream} 0.01016777
## 29                          {whipped/sour cream} => {butter} 0.01016777
## 30         {yogurt,whipped/sour cream} => {other vegetables} 0.01016777
## 31         {other vegetables,whipped/sour cream} => {yogurt} 0.01016777
## 32    {root vegetables,other vegetables} => {tropical fruit} 0.01230300
## 33             {tropical fruit,other vegetables} => {yogurt} 0.01230300
## 34        {root vegetables,whole milk} => {other vegetables} 0.02318251
## 35               {whole milk,whipped/sour cream} => {yogurt} 0.01087951
## 36                     {citrus fruit,whole milk} => {yogurt} 0.01026945
## 37              {other vegetables,whole milk} => {pip fruit} 0.01352313
## 38                  {whole milk,yogurt} => {root vegetables} 0.01453991
## 39                            {onions} => {other vegetables} 0.01423488
## 40                   {pork,whole milk} => {other vegetables} 0.01016777
## 41                   {other vegetables,whole milk} => {pork} 0.01016777
## 42     {whole milk,whipped/sour cream} => {other vegetables} 0.01464159
## 43          {root vegetables,whole milk} => {tropical fruit} 0.01199797
## 44                            {chicken} => {root vegetables} 0.01087951
## 45                                        {curd} => {yogurt} 0.01728521
## 46                                        {yogurt} => {curd} 0.01728521
## 47              {pip fruit,whole milk} => {other vegetables} 0.01352313
## 48                        {tropical fruit} => {citrus fruit} 0.01992883
## 49                        {citrus fruit} => {tropical fruit} 0.01992883
## 50                                     {berries} => {yogurt} 0.01057448
## 51                             {curd,yogurt} => {whole milk} 0.01006609
## 52                   {root vegetables} => {other vegetables} 0.04738180
## 53                   {other vegetables} => {root vegetables} 0.04738180
## 54                 {other vegetables,butter} => {whole milk} 0.01148958
## 55                               {cream cheese } => {yogurt} 0.01240468
## 56          {tropical fruit,root vegetables} => {whole milk} 0.01199797
## 57                     {whole milk,yogurt} => {citrus fruit} 0.01026945
## 58                  {frozen vegetables} => {root vegetables} 0.01159126
## 59                  {root vegetables} => {frozen vegetables} 0.01159126
## 60                             {pip fruit} => {citrus fruit} 0.01382816
## 61                             {citrus fruit} => {pip fruit} 0.01382816
## 62           {citrus fruit,whole milk} => {other vegetables} 0.01301474
## 63                  {root vegetables,yogurt} => {whole milk} 0.01453991
## 64                 {whipped/sour cream} => {root vegetables} 0.01708185
## 65                 {root vegetables} => {whipped/sour cream} 0.01708185
## 66         {other vegetables,whole milk} => {tropical fruit} 0.01708185
## 67             {tropical fruit,yogurt} => {other vegetables} 0.01230300
## 68                               {pork} => {root vegetables} 0.01362481
## 69                               {root vegetables} => {pork} 0.01362481
## 70          {other vegetables,domestic eggs} => {whole milk} 0.01230300
## 71                           {chicken} => {other vegetables} 0.01789527
## 72                 {whole milk,butter} => {other vegetables} 0.01148958
## 73                    {hamburger meat} => {other vegetables} 0.01382816
## 74                             {butter} => {root vegetables} 0.01291307
## 75                             {root vegetables} => {butter} 0.01291307
## 76                 {other vegetables,whole milk} => {yogurt} 0.02226741
## 77                  {root vegetables,whole milk} => {yogurt} 0.01453991
## 78          {whole milk,domestic eggs} => {other vegetables} 0.01230300
## 79           {other vegetables,whole milk} => {citrus fruit} 0.01301474
## 80         {tropical fruit,whole milk} => {other vegetables} 0.01708185
## 81                {whipped/sour cream} => {other vegetables} 0.02887646
## 82                {other vegetables} => {whipped/sour cream} 0.02887646
## 83                          {yogurt} => {whipped/sour cream} 0.02074225
## 84                          {whipped/sour cream} => {yogurt} 0.02074225
## 85                      {domestic eggs} => {root vegetables} 0.01433655
## 86                      {root vegetables} => {domestic eggs} 0.01433655
## 87              {whole milk,rolls/buns} => {root vegetables} 0.01270971
## 88                 {whole milk,yogurt} => {other vegetables} 0.02226741
## 89               {yogurt,whipped/sour cream} => {whole milk} 0.01087951
## 90              {root vegetables,rolls/buns} => {whole milk} 0.01270971
## 91  {whole milk,fruit/vegetable juice} => {other vegetables} 0.01047280
## 92              {pip fruit,other vegetables} => {whole milk} 0.01352313
## 93                   {tropical fruit,yogurt} => {whole milk} 0.01514997
## 94                 {other vegetables,yogurt} => {whole milk} 0.02226741
## 95                              {tropical fruit} => {yogurt} 0.02928317
## 96                              {yogurt} => {tropical fruit} 0.02928317
## 97     {other vegetables,whipped/sour cream} => {whole milk} 0.01464159
## 98                         {citrus fruit} => {domestic eggs} 0.01037112
## 99                         {domestic eggs} => {citrus fruit} 0.01037112
## 100                      {whole milk,rolls/buns} => {yogurt} 0.01555669
## 101                      {citrus fruit} => {root vegetables} 0.01769192
## 102                      {root vegetables} => {citrus fruit} 0.01769192
## 103           {root vegetables,other vegetables} => {yogurt} 0.01291307
## 104 {other vegetables,fruit/vegetable juice} => {whole milk} 0.01047280
## 105                                 {butter} => {whole milk} 0.02755465
## 106                                 {whole milk} => {butter} 0.02755465
## 107                             {beef} => {other vegetables} 0.01972547
## 108                             {other vegetables} => {beef} 0.01972547
## 109                             {pork} => {other vegetables} 0.02165735
## 110                             {other vegetables} => {pork} 0.02165735
## 111 {other vegetables,whole milk} => {fruit/vegetable juice} 0.01047280
## 112                {other vegetables,rolls/buns} => {yogurt} 0.01148958
## 113                                   {curd} => {whole milk} 0.02613116
## 114                                   {whole milk} => {curd} 0.02613116
## 115                      {butter milk} => {other vegetables} 0.01037112
## 116       {root vegetables,other vegetables} => {whole milk} 0.02318251
## 117                {frozen vegetables} => {other vegetables} 0.01779359
## 118                                     {butter} => {yogurt} 0.01464159
## 119                                     {yogurt} => {butter} 0.01464159
## 120                         {pip fruit} => {root vegetables} 0.01555669
## 121                         {root vegetables} => {pip fruit} 0.01555669
## 122                               {citrus fruit} => {yogurt} 0.02165735
## 123                               {yogurt} => {citrus fruit} 0.02165735
## 124                            {whole milk,soda} => {yogurt} 0.01047280
## 125                              {curd} => {root vegetables} 0.01087951
## 126                           {butter} => {other vegetables} 0.02003050
## 127                           {other vegetables} => {butter} 0.02003050
## 128        {tropical fruit,other vegetables} => {whole milk} 0.01708185
## 129                    {citrus fruit,yogurt} => {whole milk} 0.01026945
## 130                      {fruit/vegetable juice} => {yogurt} 0.01870869
## 131                      {yogurt} => {fruit/vegetable juice} 0.01870869
## 132                          {domestic eggs} => {whole milk} 0.02999492
## 133                          {whole milk} => {domestic eggs} 0.02999492
## 134                          {frozen vegetables} => {yogurt} 0.01240468
## 135              {whole milk,rolls/buns} => {tropical fruit} 0.01098119
## 136                    {tropical fruit} => {root vegetables} 0.02104728
## 137                    {root vegetables} => {tropical fruit} 0.02104728
## 138                 {tropical fruit} => {whipped/sour cream} 0.01382816
## 139                 {whipped/sour cream} => {tropical fruit} 0.01382816
## 140                  {pork,other vegetables} => {whole milk} 0.01016777
## 141                               {curd} => {tropical fruit} 0.01026945
## 142                   {whipped/sour cream} => {citrus fruit} 0.01087951
## 143                   {citrus fruit} => {whipped/sour cream} 0.01087951
## 144                {other vegetables,pastry} => {whole milk} 0.01057448
## 145                            {napkins} => {tropical fruit} 0.01006609
## 146                               {frankfurter} => {sausage} 0.01006609
## 147                               {sausage} => {frankfurter} 0.01006609
## 148                    {other vegetables} => {domestic eggs} 0.02226741
## 149                    {domestic eggs} => {other vegetables} 0.02226741
## 150              {fruit/vegetable juice} => {tropical fruit} 0.01372649
## 151              {tropical fruit} => {fruit/vegetable juice} 0.01372649
## 152                     {citrus fruit} => {other vegetables} 0.02887646
## 153                     {other vegetables} => {citrus fruit} 0.02887646
## 154                  {whole milk,soda} => {other vegetables} 0.01392984
## 155                    {cream cheese } => {other vegetables} 0.01372649
## 156                        {pip fruit} => {other vegetables} 0.02613116
## 157                        {other vegetables} => {pip fruit} 0.02613116
## 158               {bottled water} => {fruit/vegetable juice} 0.01423488
## 159               {fruit/vegetable juice} => {bottled water} 0.01423488
## 160                            {frankfurter} => {rolls/buns} 0.01921708
## 161                            {rolls/buns} => {frankfurter} 0.01921708
## 162                      {yogurt,rolls/buns} => {whole milk} 0.01555669
## 163                                {sausage} => {rolls/buns} 0.03060498
## 164                                {rolls/buns} => {sausage} 0.03060498
## 165                        {bottled beer} => {bottled water} 0.01576004
## 166                        {bottled water} => {bottled beer} 0.01576004
## 167                   {tropical fruit} => {other vegetables} 0.03589222
## 168                   {other vegetables} => {tropical fruit} 0.03589222
## 169          {citrus fruit,other vegetables} => {whole milk} 0.01301474
## 170                     {whipped/sour cream} => {whole milk} 0.03223183
## 171                     {whole milk} => {whipped/sour cream} 0.03223183
## 172               {sausage,whole milk} => {other vegetables} 0.01016777
## 173                        {whole milk} => {root vegetables} 0.04890696
## 174                        {root vegetables} => {whole milk} 0.04890696
## 175                               {brown bread} => {sausage} 0.01067616
## 176                               {sausage} => {brown bread} 0.01067616
## 177              {tropical fruit,rolls/buns} => {whole milk} 0.01098119
## 178                                  {yogurt} => {margarine} 0.01423488
## 179                                  {margarine} => {yogurt} 0.01423488
## 180                        {margarine} => {other vegetables} 0.01972547
## 181                        {other vegetables} => {margarine} 0.01972547
## 182                                  {sugar} => {whole milk} 0.01504830
## 183                         {margarine} => {root vegetables} 0.01108287
## 184                         {root vegetables} => {margarine} 0.01108287
## 185                         {hamburger meat} => {whole milk} 0.01474326
## 186                {fruit/vegetable juice} => {citrus fruit} 0.01037112
## 187                {citrus fruit} => {fruit/vegetable juice} 0.01037112
## 188                {yogurt,rolls/buns} => {other vegetables} 0.01148958
## 189                                    {ham} => {whole milk} 0.01148958
## 190                          {sliced cheese} => {whole milk} 0.01077783
## 191                      {domestic eggs} => {tropical fruit} 0.01138790
## 192                      {tropical fruit} => {domestic eggs} 0.01138790
## 193                                  {pip fruit} => {yogurt} 0.01799695
## 194                                  {yogurt} => {pip fruit} 0.01799695
## 195         {other vegetables,bottled water} => {whole milk} 0.01077783
## 196                            {root vegetables} => {yogurt} 0.02582613
## 197                            {yogurt} => {root vegetables} 0.02582613
## 198                             {shopping bags} => {sausage} 0.01565836
## 199                             {sausage} => {shopping bags} 0.01565836
## 200                      {white bread} => {other vegetables} 0.01372649
## 201                                    {napkins} => {yogurt} 0.01230300
## 202                             {curd} => {other vegetables} 0.01718353
## 203                  {other vegetables,soda} => {whole milk} 0.01392984
## 204                      {frozen vegetables} => {whole milk} 0.02043721
## 205                            {sugar} => {other vegetables} 0.01077783
## 206            {other vegetables,rolls/buns} => {whole milk} 0.01789527
## 207                {whole milk,pastry} => {other vegetables} 0.01057448
## 208            {whole milk,rolls/buns} => {other vegetables} 0.01789527
## 209                          {cream cheese } => {whole milk} 0.01647178
## 210                            {butter milk} => {whole milk} 0.01159126
## 211         {whole milk,bottled water} => {other vegetables} 0.01077783
## 212                              {domestic eggs} => {yogurt} 0.01433655
## 213                              {yogurt} => {domestic eggs} 0.01433655
## 214                              {margarine} => {whole milk} 0.02419929
## 215                          {dessert} => {other vegetables} 0.01159126
## 216                           {yogurt} => {other vegetables} 0.04341637
## 217                           {other vegetables} => {yogurt} 0.04341637
## 218                            {hard cheese} => {whole milk} 0.01006609
## 219                                {yogurt} => {brown bread} 0.01453991
## 220                                {brown bread} => {yogurt} 0.01453991
## 221                                {chicken} => {whole milk} 0.01759024
## 222                                       {beef} => {yogurt} 0.01169293
## 223                          {berries} => {other vegetables} 0.01026945
## 224                      {tropical fruit} => {bottled water} 0.01850534
## 225                      {bottled water} => {tropical fruit} 0.01850534
## 226                {other vegetables,whole milk} => {pastry} 0.01057448
## 227                            {white bread} => {whole milk} 0.01708185
## 228                           {margarine} => {bottled water} 0.01026945
## 229                                  {pip fruit} => {pastry} 0.01067616
## 230                                  {pastry} => {pip fruit} 0.01067616
## 231                                   {beef} => {whole milk} 0.02125064
## 232                       {frankfurter} => {root vegetables} 0.01016777
## 233                         {tropical fruit} => {whole milk} 0.04229792
## 234                         {whole milk} => {tropical fruit} 0.04229792
## 235                                    {oil} => {whole milk} 0.01128622
## 236                                 {yogurt} => {whole milk} 0.05602440
## 237                                 {whole milk} => {yogurt} 0.05602440
## 238                        {brown bread} => {tropical fruit} 0.01067616
## 239                        {tropical fruit} => {brown bread} 0.01067616
## 240                                    {chocolate} => {soda} 0.01352313
## 241                              {pip fruit} => {whole milk} 0.03009659
## 242                              {whole milk} => {pip fruit} 0.03009659
## 243                                 {onions} => {whole milk} 0.01209964
## 244             {fruit/vegetable juice} => {root vegetables} 0.01199797
## 245             {root vegetables} => {fruit/vegetable juice} 0.01199797
## 246                       {hygiene articles} => {whole milk} 0.01281139
## 247                            {brown bread} => {whole milk} 0.02521607
## 248                                 {pip fruit} => {sausage} 0.01077783
## 249                                 {sausage} => {pip fruit} 0.01077783
## 250                       {other vegetables} => {whole milk} 0.07483477
## 251                       {whole milk} => {other vegetables} 0.07483477
## 252                      {whole milk,yogurt} => {rolls/buns} 0.01555669
## 253                                   {pork} => {whole milk} 0.02216573
## 254            {fruit/vegetable juice} => {other vegetables} 0.02104728
## 255            {other vegetables} => {fruit/vegetable juice} 0.02104728
## 256                                {bottled water} => {soda} 0.02897814
## 257                                {soda} => {bottled water} 0.02897814
## 258               {fruit/vegetable juice} => {shopping bags} 0.01067616
## 259               {shopping bags} => {fruit/vegetable juice} 0.01067616
## 260                            {yogurt,soda} => {whole milk} 0.01047280
## 261                                    {sausage} => {yogurt} 0.01962379
## 262                                    {yogurt} => {sausage} 0.01962379
## 263                                    {pastry} => {sausage} 0.01250635
## 264                                    {sausage} => {pastry} 0.01250635
## 265                      {brown bread} => {other vegetables} 0.01870869
## 266                              {yogurt} => {bottled water} 0.02297916
## 267                              {bottled water} => {yogurt} 0.02297916
## 268                         {shopping bags} => {canned beer} 0.01138790
## 269                         {canned beer} => {shopping bags} 0.01138790
## 270                                      {sausage} => {soda} 0.02430097
## 271                                      {soda} => {sausage} 0.02430097
## 272                          {sausage} => {other vegetables} 0.02694459
## 273                          {other vegetables} => {sausage} 0.02694459
## 274                     {sausage} => {fruit/vegetable juice} 0.01006609
## 275                     {fruit/vegetable juice} => {sausage} 0.01006609
## 276                        {citrus fruit} => {bottled water} 0.01352313
## 277                        {bottled water} => {citrus fruit} 0.01352313
## 278               {sausage,other vegetables} => {whole milk} 0.01016777
## 279         {long life bakery product} => {other vegetables} 0.01067616
## 280                                {napkins} => {whole milk} 0.01972547
## 281                      {salty snack} => {other vegetables} 0.01077783
## 282                                 {pastry} => {whole milk} 0.03324860
## 283                                 {whole milk} => {pastry} 0.03324860
## 284                        {fruit/vegetable juice} => {soda} 0.01840366
## 285                        {soda} => {fruit/vegetable juice} 0.01840366
## 286                           {sausage} => {root vegetables} 0.01494662
## 287                           {root vegetables} => {sausage} 0.01494662
## 288                              {sausage} => {citrus fruit} 0.01128622
## 289                              {citrus fruit} => {sausage} 0.01128622
## 290                                {dessert} => {whole milk} 0.01372649
## 291               {other vegetables,whole milk} => {sausage} 0.01016777
## 292                      {frankfurter} => {other vegetables} 0.01647178
## 293                           {citrus fruit} => {whole milk} 0.03050330
## 294                           {whole milk} => {citrus fruit} 0.03050330
## 295                  {fruit/vegetable juice} => {whole milk} 0.02663955
## 296                  {whole milk} => {fruit/vegetable juice} 0.02663955
## 297                {other vegetables,yogurt} => {rolls/buns} 0.01148958
## 298                       {brown bread} => {root vegetables} 0.01016777
## 299                                {shopping bags} => {soda} 0.02460600
## 300                                {soda} => {shopping bags} 0.02460600
## 301                                     {yogurt} => {pastry} 0.01769192
## 302                                     {pastry} => {yogurt} 0.01769192
## 303                          {napkins} => {other vegetables} 0.01443823
## 304                             {pastry} => {tropical fruit} 0.01321810
## 305                             {tropical fruit} => {pastry} 0.01321810
## 306               {long life bakery product} => {whole milk} 0.01352313
## 307                            {sausage} => {tropical fruit} 0.01392984
## 308                            {tropical fruit} => {sausage} 0.01392984
## 309             {root vegetables,whole milk} => {rolls/buns} 0.01270971
## 310                                   {beef} => {rolls/buns} 0.01362481
## 311              {tropical fruit,whole milk} => {rolls/buns} 0.01098119
## 312                         {newspapers} => {tropical fruit} 0.01179461
## 313                         {tropical fruit} => {newspapers} 0.01179461
## 314       {root vegetables,other vegetables} => {rolls/buns} 0.01220132
## 315                                  {white bread} => {soda} 0.01026945
## 316                                {berries} => {whole milk} 0.01179461
## 317                                 {newspapers} => {yogurt} 0.01535333
## 318                                 {yogurt} => {newspapers} 0.01535333
## 319                              {margarine} => {rolls/buns} 0.01474326
## 320                            {frankfurter} => {whole milk} 0.02053889
## 321                                {frankfurter} => {yogurt} 0.01118454
## 322                              {shopping bags} => {pastry} 0.01189629
## 323                              {pastry} => {shopping bags} 0.01189629
## 324                                       {pastry} => {soda} 0.02104728
## 325                                       {soda} => {pastry} 0.02104728
## 326                          {waffles} => {other vegetables} 0.01006609
## 327                             {newspapers} => {rolls/buns} 0.01972547
## 328                             {rolls/buns} => {newspapers} 0.01972547
## 329                          {domestic eggs} => {rolls/buns} 0.01565836
## 330                             {newspapers} => {whole milk} 0.02735130
## 331                             {whole milk} => {newspapers} 0.02735130
## 332                                 {rolls/buns} => {yogurt} 0.03436706
## 333                                 {yogurt} => {rolls/buns} 0.03436706
## 334                        {chocolate} => {other vegetables} 0.01270971
## 335                        {root vegetables} => {newspapers} 0.01148958
## 336                        {newspapers} => {root vegetables} 0.01148958
## 337                                 {butter} => {rolls/buns} 0.01342145
## 338                              {chocolate} => {whole milk} 0.01667514
## 339                                      {napkins} => {soda} 0.01199797
## 340                           {other vegetables} => {pastry} 0.02257245
## 341                           {pastry} => {other vegetables} 0.02257245
## 342                      {shopping bags} => {tropical fruit} 0.01352313
## 343                      {tropical fruit} => {shopping bags} 0.01352313
## 344         {other vegetables,whole milk} => {bottled water} 0.01077783
## 345            {other vegetables,whole milk} => {rolls/buns} 0.01789527
## 346                     {bottled water} => {root vegetables} 0.01565836
## 347                     {root vegetables} => {bottled water} 0.01565836
## 348                                {waffles} => {whole milk} 0.01270971
## 349                              {chocolate} => {rolls/buns} 0.01179461
## 350                                 {pastry} => {rolls/buns} 0.02094560
## 351                                 {rolls/buns} => {pastry} 0.02094560
## 352                          {newspapers} => {bottled water} 0.01128622
## 353                          {bottled water} => {newspapers} 0.01128622
## 354                         {tropical fruit} => {rolls/buns} 0.02460600
## 355                         {rolls/buns} => {tropical fruit} 0.02460600
## 356                           {pip fruit} => {bottled water} 0.01057448
## 357                                 {coffee} => {whole milk} 0.01870869
## 358                       {newspapers} => {other vegetables} 0.01931876
## 359                                {sausage} => {whole milk} 0.02989324
## 360                                {whole milk} => {sausage} 0.02989324
## 361                          {bottled water} => {whole milk} 0.03436706
## 362                          {whole milk} => {bottled water} 0.03436706
## 363                    {shopping bags} => {other vegetables} 0.02318251
## 364                    {other vegetables} => {shopping bags} 0.02318251
## 365                                {napkins} => {rolls/buns} 0.01169293
## 366                        {root vegetables} => {rolls/buns} 0.02430097
## 367                        {rolls/buns} => {root vegetables} 0.02430097
## 368                                 {bottled beer} => {soda} 0.01698017
## 369                             {rolls/buns} => {whole milk} 0.05663447
## 370                             {whole milk} => {rolls/buns} 0.05663447
## 371                       {rolls/buns} => {other vegetables} 0.04260295
## 372                       {other vegetables} => {rolls/buns} 0.04260295
## 373                                   {soda} => {rolls/buns} 0.03833249
## 374                                   {rolls/buns} => {soda} 0.03833249
## 375                           {coffee} => {other vegetables} 0.01342145
## 376                     {shopping bags} => {root vegetables} 0.01281139
## 377                     {root vegetables} => {shopping bags} 0.01281139
## 378                          {rolls/buns} => {bottled water} 0.02419929
## 379                          {bottled water} => {rolls/buns} 0.02419929
## 380                                         {pork} => {soda} 0.01189629
## 381                    {bottled water} => {other vegetables} 0.02480935
## 382                    {other vegetables} => {bottled water} 0.02480935
## 383                            {salty snack} => {whole milk} 0.01118454
## 384                             {sausage} => {bottled water} 0.01199797
## 385                             {bottled water} => {sausage} 0.01199797
## 386                      {frozen vegetables} => {rolls/buns} 0.01016777
## 387                               {tropical fruit} => {soda} 0.02084392
## 388                               {soda} => {tropical fruit} 0.02084392
## 389                            {pastry} => {root vegetables} 0.01098119
## 390                            {root vegetables} => {pastry} 0.01098119
## 391                                       {soda} => {yogurt} 0.02735130
## 392                                       {yogurt} => {soda} 0.02735130
## 393                                {domestic eggs} => {soda} 0.01240468
## 394                                  {brown bread} => {soda} 0.01260803
## 395                     {whipped/sour cream} => {rolls/buns} 0.01464159
## 396                              {shopping bags} => {yogurt} 0.01525165
## 397                              {yogurt} => {shopping bags} 0.01525165
## 398                           {citrus fruit} => {rolls/buns} 0.01677682
##     confidence     lift count
## 1    0.1796733 3.372304    99
## 2    0.3591549 3.295045   102
## 3    0.2341920 3.267062   100
## 4    0.3427762 3.144780   121
## 5    0.1595149 3.040367   171
## 6    0.3313953 3.040367   171
## 7    0.5862069 3.029608   102
## 8    0.5845411 3.020999   121
## 9    0.3097826 2.842082   228
## 10   0.1535326 2.770630   113
## 11   0.3852140 2.761356    99
## 12   0.1460993 2.742150   103
## 13   0.1965649 2.742150   103
## 14   0.1956522 2.729417   144
## 15   0.2974239 2.728698   127
## 16   0.1941924 2.709053   107
## 17   0.2833724 2.700550   121
## 18   0.2188841 2.644626   102
## 19   0.2863962 2.627525   120
## 20   0.2836538 2.602365   118
## 21   0.5020921 2.594890   120
## 22   0.1644022 2.591178   121
## 23   0.5000000 2.584078   127
## 24   0.2704174 2.577089   149
## 25   0.1947674 2.574648   201
## 26   0.2701613 2.574648   201
## 27   0.3581731 2.567516   149
## 28   0.1834862 2.559698   100
## 29   0.1418440 2.559698   100
## 30   0.4901961 2.533410   100
## 31   0.3521127 2.524073   100
## 32   0.2596567 2.474538   121
## 33   0.3427762 2.457146   121
## 34   0.4740125 2.449770   228
## 35   0.3375394 2.419607   107
## 36   0.3366667 2.413350   101
## 37   0.1807065 2.388775   133
## 38   0.2595281 2.381025   143
## 39   0.4590164 2.372268   140
## 40   0.4587156 2.370714   100
## 41   0.1358696 2.356750   100
## 42   0.4542587 2.347679   144
## 43   0.2453222 2.337931   118
## 44   0.2535545 2.326221   107
## 45   0.3244275 2.325615   170
## 46   0.1239067 2.325615   170
## 47   0.4493243 2.322178   133
## 48   0.1899225 2.294702   196
## 49   0.2407862 2.294702   196
## 50   0.3180428 2.279848   104
## 51   0.5823529 2.279125    99
## 52   0.4347015 2.246605   466
## 53   0.2448765 2.246605   466
## 54   0.5736041 2.244885   113
## 55   0.3128205 2.242412   122
## 56   0.5700483 2.230969   118
## 57   0.1833031 2.214725   101
## 58   0.2410148 2.211176   114
## 59   0.1063433 2.211176   114
## 60   0.1827957 2.208594   136
## 61   0.1670762 2.208594   136
## 62   0.4266667 2.205080   128
## 63   0.5629921 2.203354   143
## 64   0.2382979 2.186250   168
## 65   0.1567164 2.186250   168
## 66   0.2282609 2.175335   168
## 67   0.4201389 2.171343   121
## 68   0.2363316 2.168210   134
## 69   0.1250000 2.168210   134
## 70   0.5525114 2.162336   121
## 71   0.4170616 2.155439   176
## 72   0.4169742 2.154987   113
## 73   0.4159021 2.149447   136
## 74   0.2330275 2.137897   127
## 75   0.1184701 2.137897   127
## 76   0.2975543 2.132979   219
## 77   0.2972973 2.131136   143
## 78   0.4101695 2.119820   121
## 79   0.1739130 2.101271   128
## 80   0.4038462 2.087140   168
## 81   0.4028369 2.081924   284
## 82   0.1492380 2.081924   284
## 83   0.1486880 2.074251   204
## 84   0.2893617 2.074251   204
## 85   0.2259615 2.073071   141
## 86   0.1315299 2.073071   141
## 87   0.2244165 2.058896   125
## 88   0.3974592 2.054131   219
## 89   0.5245098 2.052747   107
## 90   0.5230126 2.046888   125
## 91   0.3931298 2.031756   103
## 92   0.5175097 2.025351   133
## 93   0.5173611 2.024770   149
## 94   0.5128806 2.007235   219
## 95   0.2790698 2.000475   288
## 96   0.2099125 2.000475   288
## 97   0.5070423 1.984385   144
## 98   0.1253071 1.974993   102
## 99   0.1634615 1.974993   102
## 100  0.2746858 1.969049   153
## 101  0.2137592 1.961121   174
## 102  0.1623134 1.961121   174
## 103  0.2725322 1.953611   127
## 104  0.4975845 1.947371   103
## 105  0.4972477 1.946053   271
## 106  0.1078392 1.946053   271
## 107  0.3759690 1.943066   194
## 108  0.1019443 1.943066   194
## 109  0.3756614 1.941476   213
## 110  0.1119285 1.941476   213
## 111  0.1399457 1.935816   103
## 112  0.2696897 1.933235   113
## 113  0.4904580 1.919481   257
## 114  0.1022682 1.919481   257
## 115  0.3709091 1.916916   102
## 116  0.4892704 1.914833   228
## 117  0.3699789 1.912108   175
## 118  0.2642202 1.894027   144
## 119  0.1049563 1.894027   144
## 120  0.2056452 1.886679   153
## 121  0.1427239 1.886679   153
## 122  0.2616708 1.875752   213
## 123  0.1552478 1.875752   213
## 124  0.2614213 1.873964   103
## 125  0.2041985 1.873407   107
## 126  0.3614679 1.868122   197
## 127  0.1035208 1.868122   197
## 128  0.4759207 1.862587   168
## 129  0.4741784 1.855768   101
## 130  0.2587904 1.855105   184
## 131  0.1341108 1.855105   184
## 132  0.4727564 1.850203   295
## 133  0.1173896 1.850203   295
## 134  0.2579281 1.848924   122
## 135  0.1938959 1.847835   108
## 136  0.2005814 1.840222   207
## 137  0.1930970 1.840222   207
## 138  0.1317829 1.838419   136
## 139  0.1929078 1.838419   136
## 140  0.4694836 1.837394   100
## 141  0.1927481 1.836897   101
## 142  0.1517730 1.833769   107
## 143  0.1314496 1.833769   107
## 144  0.4684685 1.833421   104
## 145  0.1922330 1.831988    99
## 146  0.1706897 1.816810    99
## 147  0.1071429 1.816810    99
## 148  0.1150815 1.813824   219
## 149  0.3509615 1.813824   219
## 150  0.1898734 1.809501   135
## 151  0.1308140 1.809501   135
## 152  0.3488943 1.803140   284
## 153  0.1492380 1.803140   284
## 154  0.3477157 1.797049   137
## 155  0.3461538 1.788977   135
## 156  0.3454301 1.785237   257
## 157  0.1350499 1.785237   257
## 158  0.1287948 1.781571   140
## 159  0.1969058 1.781571   140
## 160  0.3258621 1.771616   189
## 161  0.1044776 1.771616   189
## 162  0.4526627 1.771563   153
## 163  0.3257576 1.771048   301
## 164  0.1663903 1.771048   301
## 165  0.1957071 1.770726   155
## 166  0.1425943 1.770726   155
## 167  0.3420543 1.767790   353
## 168  0.1854966 1.767790   353
## 169  0.4507042 1.763898   128
## 170  0.4496454 1.759754   317
## 171  0.1261441 1.759754   317
## 172  0.3401361 1.757876   100
## 173  0.1914047 1.756031   481
## 174  0.4486940 1.756031   481
## 175  0.1645768 1.751746   105
## 176  0.1136364 1.751746   105
## 177  0.4462810 1.746587   108
## 178  0.1020408 1.742312   140
## 179  0.2430556 1.742312   140
## 180  0.3368056 1.740663   194
## 181  0.1019443 1.740663   194
## 182  0.4444444 1.739400   148
## 183  0.1892361 1.736135   109
## 184  0.1016791 1.736135   109
## 185  0.4434251 1.735410   145
## 186  0.1434599 1.733327   102
## 187  0.1253071 1.733327   102
## 188  0.3343195 1.727815   113
## 189  0.4414062 1.727509   113
## 190  0.4398340 1.721356   106
## 191  0.1794872 1.710520   112
## 192  0.1085271 1.710520   112
## 193  0.2379032 1.705378   177
## 194  0.1290087 1.705378   177
## 195  0.4344262 1.700192   106
## 196  0.2369403 1.698475   254
## 197  0.1851312 1.698475   254
## 198  0.1589267 1.691606   154
## 199  0.1666667 1.691606   154
## 200  0.3260870 1.685268   135
## 201  0.2349515 1.684218   121
## 202  0.3225191 1.666829   169
## 203  0.4254658 1.665124   137
## 204  0.4249471 1.663094   201
## 205  0.3183183 1.645119   106
## 206  0.4200477 1.643919   176
## 207  0.3180428 1.643695   104
## 208  0.3159785 1.633026   176
## 209  0.4153846 1.625670   162
## 210  0.4145455 1.622385   114
## 211  0.3136095 1.620783   106
## 212  0.2259615 1.619775   141
## 213  0.1027697 1.619775   141
## 214  0.4131944 1.617098   238
## 215  0.3123288 1.614164   114
## 216  0.3112245 1.608457   427
## 217  0.2243826 1.608457   427
## 218  0.4107884 1.607682    99
## 219  0.1042274 1.606703   143
## 220  0.2241379 1.606703   143
## 221  0.4099526 1.604411   173
## 222  0.2228682 1.597601   115
## 223  0.3088685 1.596280   101
## 224  0.1763566 1.595646   182
## 225  0.1674333 1.595646   182
## 226  0.1413043 1.588261   104
## 227  0.4057971 1.588147   168
## 228  0.1753472 1.586513   101
## 229  0.1411290 1.586290   105
## 230  0.1200000 1.586290   105
## 231  0.4050388 1.585180   209
## 232  0.1724138 1.581800   100
## 233  0.4031008 1.577595   416
## 234  0.1655392 1.577595   416
## 235  0.4021739 1.573968   111
## 236  0.4016035 1.571735   551
## 237  0.2192598 1.571735   551
## 238  0.1645768 1.568423   105
## 239  0.1017442 1.568423   105
## 240  0.2725410 1.562939   133
## 241  0.3978495 1.557043   296
## 242  0.1177875 1.557043   296
## 243  0.3901639 1.526965   119
## 244  0.1659634 1.522622   118
## 245  0.1100746 1.522622   118
## 246  0.3888889 1.521975   126
## 247  0.3887147 1.521293   248
## 248  0.1424731 1.516475   106
## 249  0.1147186 1.516475   106
## 250  0.3867578 1.513634   736
## 251  0.2928770 1.513634   736
## 252  0.2776770 1.509648   153
## 253  0.3844797 1.504719   218
## 254  0.2911392 1.504653   207
## 255  0.1087756 1.504653   207
## 256  0.2621895 1.503577   285
## 257  0.1661808 1.503577   285
## 258  0.1476793 1.498892   105
## 259  0.1083591 1.498892   105
## 260  0.3828996 1.498535   103
## 261  0.2088745 1.497289   193
## 262  0.1406706 1.497289   193
## 263  0.1405714 1.496234   123
## 264  0.1331169 1.496234   123
## 265  0.2884013 1.490503   184
## 266  0.1647230 1.490387   226
## 267  0.2079117 1.490387   226
## 268  0.1155831 1.487905   112
## 269  0.1465969 1.487905   112
## 270  0.2586580 1.483324   239
## 271  0.1393586 1.483324   239
## 272  0.2867965 1.482209   265
## 273  0.1392538 1.482209   265
## 274  0.1071429 1.482068    99
## 275  0.1392405 1.482068    99
## 276  0.1633907 1.478332   133
## 277  0.1223551 1.478332   133
## 278  0.3773585 1.476849   100
## 279  0.2853261 1.474610   105
## 280  0.3766990 1.474268   194
## 281  0.2849462 1.472646   106
## 282  0.3737143 1.462587   327
## 283  0.1301234 1.462587   327
## 284  0.2545710 1.459887   181
## 285  0.1055394 1.459887   181
## 286  0.1590909 1.459570   147
## 287  0.1371269 1.459570   147
## 288  0.1201299 1.451446   111
## 289  0.1363636 1.451446   111
## 290  0.3698630 1.447514   135
## 291  0.1358696 1.446187   100
## 292  0.2793103 1.443519   162
## 293  0.3685504 1.442377   300
## 294  0.1193792 1.442377   300
## 295  0.3684951 1.442160   262
## 296  0.1042579 1.442160   262
## 297  0.2646370 1.438753   113
## 298  0.1567398 1.438000   100
## 299  0.2497420 1.432194   242
## 300  0.1411079 1.432194   242
## 301  0.1268222 1.425481   174
## 302  0.1988571 1.425481   174
## 303  0.2757282 1.425006   142
## 304  0.1485714 1.415891   130
## 305  0.1259690 1.415891   130
## 306  0.3614130 1.414444   133
## 307  0.1482684 1.413004   137
## 308  0.1327519 1.413004   137
## 309  0.2598753 1.412865   125
## 310  0.2596899 1.411858   134
## 311  0.2596154 1.411452   108
## 312  0.1477707 1.408261   116
## 313  0.1124031 1.408261   116
## 314  0.2575107 1.400010   120
## 315  0.2439614 1.399044   101
## 316  0.3547401 1.388328   116
## 317  0.1923567 1.378883   151
## 318  0.1100583 1.378883   151
## 319  0.2517361 1.368615   145
## 320  0.3482759 1.363029   202
## 321  0.1896552 1.359518   110
## 322  0.1207430 1.357152   117
## 323  0.1337143 1.357152   117
## 324  0.2365714 1.356665   207
## 325  0.1206997 1.356665   207
## 326  0.2619048 1.353565    99
## 327  0.2471338 1.343593   194
## 328  0.1072416 1.343593   194
## 329  0.2467949 1.341751   154
## 330  0.3426752 1.341110   269
## 331  0.1070434 1.341110   269
## 332  0.1868436 1.339363   338
## 333  0.2463557 1.339363   338
## 334  0.2561475 1.323810   125
## 335  0.1054104 1.320652   113
## 336  0.1439490 1.320652   113
## 337  0.2422018 1.316780   132
## 338  0.3360656 1.315243   164
## 339  0.2291262 1.313969   118
## 340  0.1166579 1.311235   222
## 341  0.2537143 1.311235   222
## 342  0.1372549 1.308045   133
## 343  0.1288760 1.308045   133
## 344  0.1440217 1.303085   106
## 345  0.2391304 1.300082   176
## 346  0.1416743 1.299783   154
## 347  0.1436567 1.299783   154
## 348  0.3306878 1.294196   125
## 349  0.2377049 1.292332   116
## 350  0.2354286 1.279956   206
## 351  0.1138751 1.279956   206
## 352  0.1414013 1.279376   111
## 353  0.1021159 1.279376   111
## 354  0.2344961 1.274886   242
## 355  0.1337756 1.274886   242
## 356  0.1397849 1.264752   104
## 357  0.3222417 1.261141   184
## 358  0.2420382 1.250891   190
## 359  0.3181818 1.245252   294
## 360  0.1169916 1.245252   294
## 361  0.3109476 1.216940   338
## 362  0.1345006 1.216940   338
## 363  0.2352941 1.216037   228
## 364  0.1198108 1.216037   228
## 365  0.2233010 1.214022   115
## 366  0.2229478 1.212101   239
## 367  0.1321172 1.212101   239
## 368  0.2108586 1.209209   167
## 369  0.3079049 1.205032   557
## 370  0.2216474 1.205032   557
## 371  0.2316197 1.197047   419
## 372  0.2201787 1.197047   419
## 373  0.2198251 1.195124   377
## 374  0.2084024 1.195124   377
## 375  0.2311734 1.194740   132
## 376  0.1300310 1.192961   126
## 377  0.1175373 1.192961   126
## 378  0.1315644 1.190373   238
## 379  0.2189512 1.190373   238
## 380  0.2063492 1.183350   117
## 381  0.2244710 1.160101   244
## 382  0.1282186 1.160101   244
## 383  0.2956989 1.157262   110
## 384  0.1277056 1.155460   118
## 385  0.1085557 1.155460   118
## 386  0.2114165 1.149409   100
## 387  0.1986434 1.139159   205
## 388  0.1195335 1.139159   205
## 389  0.1234286 1.132388   108
## 390  0.1007463 1.132388   108
## 391  0.1568513 1.124368   269
## 392  0.1960641 1.124368   269
## 393  0.1955128 1.121206   122
## 394  0.1943574 1.114580   124
## 395  0.2042553 1.110476   144
## 396  0.1547988 1.109654   150
## 397  0.1093294 1.109654   150
## 398  0.2027027 1.102035   165

Auch hier plotten wir wieder:

subrules <- head(groc.rules, n = 10, by = "lift")
plot(subrules, method = "graph")

Was kann ein Händler mit diesen Regeln anfangen?