SlideShare a Scribd company logo
1 of 47
Download to read offline
1
Connect With Us
Website ( )
Free Online R Courses ( )
R Packages ( )
Shiny Apps ( )
Blog ( )
GitHub ( )
YouTube ( )
Twitter ( )
Facebook ( )
Linkedin ( )
• https://www.rsquaredacademy.com/
• https://rsquared-academy.thinkific.com/
• https://pkgs.rsquaredacademy.com
• https://apps.rsquaredacademy.com
• https://blog.rsquaredacademy.com
• https://github.com/rsquaredacademy
• https://www.youtube.com/user/rsquaredin/
• https://twitter.com/rsquaredacademy
• https://www.facebook.com/rsquaredacademy/
• https://in.linkedin.com/company/rsquared-academy
2
Resources
• Slides
• Code & Data
• RStudio Cloud
3
What?
Why?
How?
Use Cases
Demo
•
•
•
•
•
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Data
• UCI
• data.world
19
Data Dictionary
invoice number
stock code
description
quantity
invoice date
unit price
customer id
country
•
•
•
•
•
•
•
•
20
Libraries
library(readxl)
library(readr)
library(mbar)
library(arules)
library(arulesViz)
library(magrittr)
library(dplyr)
library(lubridate)
library(forcats)
library(ggplot2)
21
Read Data
basket_data <- read.transactions("transaction_data.csv", format = "baske
sep = ",")
basket_data
## transactions in sparse format with
## 25901 transactions (rows) and
## 10085 items (columns)
22
Data Summary
summary(basket_data)
## transactions as itemMatrix in sparse format with
## 25901 rows (elements/itemsets/transactions) and
## 10085 columns (items) and a density of 0.001660018
##
## most frequent items:
## WHITE HANGING HEART T-LIGHT HOLDER REGENCY CAKESTAND 3 TIER
## 1999 1914
## JUMBO BAG RED RETROSPOT PARTY BUNTING
## 1806 1488
## LUNCH BAG RED RETROSPOT (Other)
## 1404 425005
##
## element (itemset/transaction) length distribution:
## sizes
## 0 1 2 3 4 5 6 7 8 9 10 11 12 13
## 1454 4578 1727 1208 942 891 781 715 696 683 612 642 547 530
## 15 16 17 18 19 20 21 22 23 24 25 26 27 28
## 555 537 479 459 491 428 405 328 311 280 248 261 235 221
23
24
Generate Rules
rules <- apriori(basket_data, parameter = list(supp=0.009, conf=0.8,
target = "rules", maxlen = 4))
## Apriori
##
## Parameter specification:
## confidence minval smax arem aval originalSupport maxtime support mi
## 0.8 0.1 1 none FALSE TRUE 5 0.009
## maxlen target ext
## 4 rules FALSE
##
## Algorithmic control:
## filter tree heap memopt load sort verbose
## 0.1 TRUE TRUE FALSE TRUE 2 TRUE
##
## Absolute minimum support count: 233
##
## set item appearances ...[0 item(s)] done [0.00s].
## set transactions ...[10085 item(s), 25901 transaction(s)] done [1.41s
## sorting and recoding items [508 item(s)] done [0 03s]
## Warning in apriori(basket_data, parameter = list(supp = 0.009, conf =
## 0.8, : Mining stopped (maxlen reached). Only patterns up to a length
## returned! 25
Rules Summary
summary(rules)
## set of 22 rules
##
## rule length distribution (lhs + rhs):sizes
## 2 3 4
## 11 9 2
##
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 2.000 2.000 2.500 2.591 3.000 4.000
##
## summary of quality measures:
## support confidence lift count
## Min. :0.009034 Min. :0.8035 Min. :22.59 Min. :234.0
## 1st Qu.:0.010453 1st Qu.:0.8530 1st Qu.:25.02 1st Qu.:270.8
## Median :0.013223 Median :0.8868 Median :55.94 Median :342.5
## Mean :0.012760 Mean :0.9120 Mean :48.55 Mean :330.5
## 3rd Qu.:0.014362 3rd Qu.:1.0000 3rd Qu.:61.23 3rd Qu.:372.0
## Max. :0.018339 Max. :1.0000 Max. :71.30 Max. :475.0
##
26
Inspect Rules
basket_rules <- sort(rules, by = 'confidence', decreasing = TRUE)
inspect(basket_rules[1:10])
## lhs rhs
## [1] {BACK DOOR} => {KEY FOB}
## [2] {SET 3 RETROSPOT TEA} => {SUGAR}
## [3] {SUGAR} => {SET 3 RETROSPOT TEA}
## [4] {SET 3 RETROSPOT TEA} => {COFFEE}
## [5] {SUGAR} => {COFFEE}
## [6] {SHED} => {KEY FOB}
## [7] {SET 3 RETROSPOT TEA,
## SUGAR} => {COFFEE}
## [8] {COFFEE,
## SET 3 RETROSPOT TEA} => {SUGAR}
## [9] {COFFEE,
## SUGAR} => {SET 3 RETROSPOT TEA}
## [10] {PINK REGENCY TEACUP AND SAUCER,
## REGENCY CAKESTAND 3 TIER,
## ROSES REGENCY TEACUP AND SAUCER} => {GREEN REGENCY TEACUP AND S
27
28
29
30
Redundant Rules
inspect(rules[is.redundant(rules)])
## lhs rhs support
## [1] {SET 3 RETROSPOT TEA,SUGAR} => {COFFEE} 0.01436238
## [2] {COFFEE,SET 3 RETROSPOT TEA} => {SUGAR} 0.01436238
## [3] {COFFEE,SUGAR} => {SET 3 RETROSPOT TEA} 0.01436238
## confidence lift count
## [1] 1 55.94168 372
## [2] 1 69.62634 372
## [3] 1 69.62634 372
31
Non Redundant Rules
inspect(rules[!is.redundant(rules)])
## lhs rhs
## [1] {REGENCY TEA PLATE PINK} => {REGENCY TEA PLATE GREEN
## [2] {BACK DOOR} => {KEY FOB}
## [3] {SET 3 RETROSPOT TEA} => {SUGAR}
## [4] {SUGAR} => {SET 3 RETROSPOT TEA}
## [5] {SET 3 RETROSPOT TEA} => {COFFEE}
## [6] {COFFEE} => {SET 3 RETROSPOT TEA}
## [7] {SUGAR} => {COFFEE}
## [8] {COFFEE} => {SUGAR}
## [9] {REGENCY TEA PLATE GREEN} => {REGENCY TEA PLATE ROSES
## [10] {SHED} => {KEY FOB}
## [11] {SET/6 RED SPOTTY PAPER CUPS} => {SET/6 RED SPOTTY PAPER
## [12] {SET/20 RED RETROSPOT PAPER NAPKINS,
## SET/6 RED SPOTTY PAPER CUPS} => {SET/6 RED SPOTTY PAPER
## [13] {PINK REGENCY TEACUP AND SAUCER,
## ROSES REGENCY TEACUP AND SAUCER} => {GREEN REGENCY TEACUP AN
## [14] {GREEN REGENCY TEACUP AND SAUCER,
## PINK REGENCY TEACUP AND SAUCER} => {ROSES REGENCY TEACUP AN
32
What influenced purchase of product X?
sugar_rules <- apriori(basket_data, parameter = list(supp = 0.009, conf
appearance = list(default = "lhs", rhs = "SUGAR"))
## Apriori
##
## Parameter specification:
## confidence minval smax arem aval originalSupport maxtime support mi
## 0.8 0.1 1 none FALSE TRUE 5 0.009
## 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: 233
##
## set item appearances ...[1 item(s)] done [0.00s].
## set transactions ...[10085 item(s), 25901 transaction(s)] done [1.32s
## sorting and recoding items [508 item(s)] done [0 03s]
33
What influenced purchase of product X?
rules_sugar <- sort(sugar_rules, by = "confidence", decreasing = TRUE)
inspect(rules_sugar)
## lhs rhs support confidence lif
## [1] {SET 3 RETROSPOT TEA} => {SUGAR} 0.01436238 1.0000000 69.
## [2] {COFFEE,SET 3 RETROSPOT TEA} => {SUGAR} 0.01436238 1.0000000 69.
## [3] {COFFEE} => {SUGAR} 0.01436238 0.8034557 55.
## count
## [1] 372
## [2] 372
## [3] 372
34
What purchases did product X influence?
sugar_rules <- apriori(basket_data, parameter = list(supp = 0.009, conf
appearance = list(default = "rhs", lhs = "SUGAR"))
## Apriori
##
## Parameter specification:
## confidence minval smax arem aval originalSupport maxtime support mi
## 0.8 0.1 1 none FALSE TRUE 5 0.009
## 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: 233
##
## set item appearances ...[1 item(s)] done [0.00s].
## set transactions ...[10085 item(s), 25901 transaction(s)] done [1.35s
## sorting and recoding items [508 item(s)] done [0 03s]
35
What purchases did product X influence?
rules_sugar <- sort(sugar_rules, by = "confidence", decreasing = TRUE)
inspect(rules_sugar)
## lhs rhs support confidence lift c
## [1] {SUGAR} => {SET 3 RETROSPOT TEA} 0.01436238 1 69.62634 3
## [2] {SUGAR} => {COFFEE} 0.01436238 1 55.94168 3
36
Top Rules by Support
supp_rules <- sort(rules, by = 'support', decreasing = TRUE)
top_rules <- supp_rules[1:10]
inspect(top_rules)
## lhs rhs
## [1] {PINK REGENCY TEACUP AND SAUCER,
## ROSES REGENCY TEACUP AND SAUCER} => {GREEN REGENCY TEACUP AND S
## [2] {GREEN REGENCY TEACUP AND SAUCER,
## PINK REGENCY TEACUP AND SAUCER} => {ROSES REGENCY TEACUP AND S
## [3] {SET 3 RETROSPOT TEA} => {SUGAR}
## [4] {SUGAR} => {SET 3 RETROSPOT TEA}
## [5] {SET 3 RETROSPOT TEA} => {COFFEE}
## [6] {COFFEE} => {SET 3 RETROSPOT TEA}
## [7] {SUGAR} => {COFFEE}
## [8] {COFFEE} => {SUGAR}
## [9] {SET 3 RETROSPOT TEA,
## SUGAR} => {COFFEE}
## [10] {COFFEE,
## SET 3 RETROSPOT TEA} => {SUGAR}
37
Top Rules by Confidence
conf_rules <- sort(rules, by = 'confidence', decreasing = TRUE)
top_rules <- conf_rules[1:10]
inspect(top_rules)
## lhs rhs
## [1] {BACK DOOR} => {KEY FOB}
## [2] {SET 3 RETROSPOT TEA} => {SUGAR}
## [3] {SUGAR} => {SET 3 RETROSPOT TEA}
## [4] {SET 3 RETROSPOT TEA} => {COFFEE}
## [5] {SUGAR} => {COFFEE}
## [6] {SHED} => {KEY FOB}
## [7] {SET 3 RETROSPOT TEA,
## SUGAR} => {COFFEE}
## [8] {COFFEE,
## SET 3 RETROSPOT TEA} => {SUGAR}
## [9] {COFFEE,
## SUGAR} => {SET 3 RETROSPOT TEA}
## [10] {PINK REGENCY TEACUP AND SAUCER,
## REGENCY CAKESTAND 3 TIER,
## ROSES REGENCY TEACUP AND SAUCER} => {GREEN REGENCY TEACUP AND S
38
Top Rules by Lift
lift_rules <- sort(rules, by = 'lift', decreasing = TRUE)
top_rules <- lift_rules[1:10]
inspect(top_rules)
## lhs rhs suppo
## [1] {REGENCY TEA PLATE PINK} => {REGENCY TEA PLATE GREEN} 0.0090344
## [2] {SET 3 RETROSPOT TEA} => {SUGAR} 0.0143623
## [3] {SUGAR} => {SET 3 RETROSPOT TEA} 0.0143623
## [4] {COFFEE,
## SET 3 RETROSPOT TEA} => {SUGAR} 0.0143623
## [5] {COFFEE,
## SUGAR} => {SET 3 RETROSPOT TEA} 0.0143623
## [6] {BACK DOOR} => {KEY FOB} 0.0096135
## [7] {SHED} => {KEY FOB} 0.0112736
## [8] {REGENCY TEA PLATE GREEN} => {REGENCY TEA PLATE ROSES} 0.0103470
## [9] {SET 3 RETROSPOT TEA} => {COFFEE} 0.0143623
## [10] {COFFEE} => {SET 3 RETROSPOT TEA} 0.0143623
39
40
41
42
43
44
45
Summary
unsupervised data mining technique
uncovers products frequently bought together
creates if-then scenario rules
cost-effective, insightful and actionable
association rule mining has applications in several industries
directionality of rule is lost while using lift
confidence as a measure can be misleading
•
•
•
•
•
•
•
46
47

More Related Content

What's hot

30ประชาคมอาเซียนมีผลอย่างไรต่อชีวิตของเรา
30ประชาคมอาเซียนมีผลอย่างไรต่อชีวิตของเรา30ประชาคมอาเซียนมีผลอย่างไรต่อชีวิตของเรา
30ประชาคมอาเซียนมีผลอย่างไรต่อชีวิตของเรา
พัน พัน
 
Dipôles linéaires, régime transitoire
Dipôles linéaires, régime transitoireDipôles linéaires, régime transitoire
Dipôles linéaires, régime transitoire
Achraf Ourti
 

What's hot (20)

第3回 データフレームの基本操作 その1(解答付き)
第3回 データフレームの基本操作 その1(解答付き)第3回 データフレームの基本操作 その1(解答付き)
第3回 データフレームの基本操作 その1(解答付き)
 
Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...
Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...
Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...
 
第3回 データフレームの基本操作 その1
第3回 データフレームの基本操作 その1第3回 データフレームの基本操作 その1
第3回 データフレームの基本操作 その1
 
第2回 基本演算,データ型の基礎,ベクトルの操作方法
第2回 基本演算,データ型の基礎,ベクトルの操作方法第2回 基本演算,データ型の基礎,ベクトルの操作方法
第2回 基本演算,データ型の基礎,ベクトルの操作方法
 
第6回 関数とフロー制御
第6回 関数とフロー制御第6回 関数とフロー制御
第6回 関数とフロー制御
 
JSUG SpringOne 2017報告会
JSUG SpringOne 2017報告会JSUG SpringOne 2017報告会
JSUG SpringOne 2017報告会
 
とにかく分かりづらいTwelve-Factor Appの解説を試みる
とにかく分かりづらいTwelve-Factor Appの解説を試みるとにかく分かりづらいTwelve-Factor Appの解説を試みる
とにかく分かりづらいTwelve-Factor Appの解説を試みる
 
wreewrer
wreewrerwreewrer
wreewrer
 
M12 random forest-part01
M12 random forest-part01M12 random forest-part01
M12 random forest-part01
 
02 modèle microscopique du gaz parfait, pression et température
02 modèle microscopique du gaz parfait, pression et température02 modèle microscopique du gaz parfait, pression et température
02 modèle microscopique du gaz parfait, pression et température
 
Java EEでもOAuth 2.0!~そしてPayara Micro on Cloud Foundryで遊ぶ~
Java EEでもOAuth 2.0!~そしてPayara Micro on Cloud Foundryで遊ぶ~Java EEでもOAuth 2.0!~そしてPayara Micro on Cloud Foundryで遊ぶ~
Java EEでもOAuth 2.0!~そしてPayara Micro on Cloud Foundryで遊ぶ~
 
M11 bagging loo cv
M11 bagging loo cvM11 bagging loo cv
M11 bagging loo cv
 
Java Unicode with Live GUI Examples
Java Unicode with Live GUI ExamplesJava Unicode with Live GUI Examples
Java Unicode with Live GUI Examples
 
Java Unicode with Cool GUI Examples
Java Unicode with Cool GUI ExamplesJava Unicode with Cool GUI Examples
Java Unicode with Cool GUI Examples
 
第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)
第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)
第5回 様々なファイル形式の読み込みとデータの書き出し(解答付き)
 
30ประชาคมอาเซียนมีผลอย่างไรต่อชีวิตของเรา
30ประชาคมอาเซียนมีผลอย่างไรต่อชีวิตของเรา30ประชาคมอาเซียนมีผลอย่างไรต่อชีวิตของเรา
30ประชาคมอาเซียนมีผลอย่างไรต่อชีวิตของเรา
 
M09-Cross validating-naive-bayes
M09-Cross validating-naive-bayesM09-Cross validating-naive-bayes
M09-Cross validating-naive-bayes
 
Dipôles linéaires, régime transitoire
Dipôles linéaires, régime transitoireDipôles linéaires, régime transitoire
Dipôles linéaires, régime transitoire
 
Prediction
PredictionPrediction
Prediction
 
Causality
CausalityCausality
Causality
 

Similar to Market Basket Analysis in R

Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.
David Tollmyr
 
Forecasting Revenue With Stationary Time Series Models
Forecasting Revenue With Stationary Time Series ModelsForecasting Revenue With Stationary Time Series Models
Forecasting Revenue With Stationary Time Series Models
Geoffery Mullings
 
Data manipulation and visualization in r 20190711 myanmarucsy
Data manipulation and visualization in r 20190711 myanmarucsyData manipulation and visualization in r 20190711 myanmarucsy
Data manipulation and visualization in r 20190711 myanmarucsy
SmartHinJ
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
Wesley Beary
 
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docx
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docxSheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docx
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docx
edgar6wallace88877
 

Similar to Market Basket Analysis in R (20)

Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.Gotcha! Ruby things that will come back to bite you.
Gotcha! Ruby things that will come back to bite you.
 
Elixir
ElixirElixir
Elixir
 
Association rules in r
Association rules in rAssociation rules in r
Association rules in r
 
Getting started with R when analysing GitHub commits
Getting started with R when analysing GitHub commitsGetting started with R when analysing GitHub commits
Getting started with R when analysing GitHub commits
 
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter AnalysisIBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
IBM Insight 2015 - 1824 - Using Bluemix and dashDB for Twitter Analysis
 
Forecasting Revenue With Stationary Time Series Models
Forecasting Revenue With Stationary Time Series ModelsForecasting Revenue With Stationary Time Series Models
Forecasting Revenue With Stationary Time Series Models
 
Trading on SPY
Trading on SPYTrading on SPY
Trading on SPY
 
Data manipulation and visualization in r 20190711 myanmarucsy
Data manipulation and visualization in r 20190711 myanmarucsyData manipulation and visualization in r 20190711 myanmarucsy
Data manipulation and visualization in r 20190711 myanmarucsy
 
Extending Structured Streaming Made Easy with Algebra with Erik Erlandson
Extending Structured Streaming Made Easy with Algebra with Erik ErlandsonExtending Structured Streaming Made Easy with Algebra with Erik Erlandson
Extending Structured Streaming Made Easy with Algebra with Erik Erlandson
 
Beyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the codeBeyond PHP - it's not (just) about the code
Beyond PHP - it's not (just) about the code
 
PyCon Siberia 2016. Не доверяйте тестам!
PyCon Siberia 2016. Не доверяйте тестам!PyCon Siberia 2016. Не доверяйте тестам!
PyCon Siberia 2016. Не доверяйте тестам!
 
fog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloudfog or: How I Learned to Stop Worrying and Love the Cloud
fog or: How I Learned to Stop Worrying and Love the Cloud
 
Decipher Multi-Factor Authentication - A Developers Introduction
Decipher Multi-Factor Authentication - A Developers IntroductionDecipher Multi-Factor Authentication - A Developers Introduction
Decipher Multi-Factor Authentication - A Developers Introduction
 
Mssql opt
Mssql optMssql opt
Mssql opt
 
ClojureBridge - Helsinki 17/05/2015
ClojureBridge - Helsinki 17/05/2015ClojureBridge - Helsinki 17/05/2015
ClojureBridge - Helsinki 17/05/2015
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docx
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docxSheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docx
Sheet1Amys One Day Food RecallHeight 5 ft 8 inchesAge 19Weight.docx
 
Real
RealReal
Real
 

More from Rsquared Academy

More from Rsquared Academy (20)

Handling Date & Time in R
Handling Date & Time in RHandling Date & Time in R
Handling Date & Time in R
 
Joining Data with dplyr
Joining Data with dplyrJoining Data with dplyr
Joining Data with dplyr
 
Variables & Data Types in R
Variables & Data Types in RVariables & Data Types in R
Variables & Data Types in R
 
How to install & update R packages?
How to install & update R packages?How to install & update R packages?
How to install & update R packages?
 
How to get help in R?
How to get help in R?How to get help in R?
How to get help in R?
 
Introduction to R
Introduction to RIntroduction to R
Introduction to R
 
RMySQL Tutorial For Beginners
RMySQL Tutorial For BeginnersRMySQL Tutorial For Beginners
RMySQL Tutorial For Beginners
 
R Markdown Tutorial For Beginners
R Markdown Tutorial For BeginnersR Markdown Tutorial For Beginners
R Markdown Tutorial For Beginners
 
R Data Visualization Tutorial: Bar Plots
R Data Visualization Tutorial: Bar PlotsR Data Visualization Tutorial: Bar Plots
R Data Visualization Tutorial: Bar Plots
 
R Programming: Introduction to Matrices
R Programming: Introduction to MatricesR Programming: Introduction to Matrices
R Programming: Introduction to Matrices
 
R Programming: Introduction to Vectors
R Programming: Introduction to VectorsR Programming: Introduction to Vectors
R Programming: Introduction to Vectors
 
R Programming: Variables & Data Types
R Programming: Variables & Data TypesR Programming: Variables & Data Types
R Programming: Variables & Data Types
 
Data Visualization With R: Learn To Combine Multiple Graphs
Data Visualization With R: Learn To Combine Multiple GraphsData Visualization With R: Learn To Combine Multiple Graphs
Data Visualization With R: Learn To Combine Multiple Graphs
 
R Data Visualization: Learn To Add Text Annotations To Plots
R Data Visualization: Learn To Add Text Annotations To PlotsR Data Visualization: Learn To Add Text Annotations To Plots
R Data Visualization: Learn To Add Text Annotations To Plots
 
Data Visualization With R: Learn To Modify Font Of Graphical Parameters
Data Visualization With R: Learn To Modify Font Of Graphical ParametersData Visualization With R: Learn To Modify Font Of Graphical Parameters
Data Visualization With R: Learn To Modify Font Of Graphical Parameters
 
Data Visualization With R: Learn To Modify Color Of Plots
Data Visualization With R: Learn To Modify Color Of PlotsData Visualization With R: Learn To Modify Color Of Plots
Data Visualization With R: Learn To Modify Color Of Plots
 
Data Visualization With R: Learn To Modify Title, Axis Labels & Range
Data Visualization With R: Learn To Modify Title, Axis Labels & RangeData Visualization With R: Learn To Modify Title, Axis Labels & Range
Data Visualization With R: Learn To Modify Title, Axis Labels & Range
 
Data Visualization With R: Introduction
Data Visualization With R: IntroductionData Visualization With R: Introduction
Data Visualization With R: Introduction
 
Data Visualization With R
Data Visualization With RData Visualization With R
Data Visualization With R
 
R Programming: Mathematical Functions In R
R Programming: Mathematical Functions In RR Programming: Mathematical Functions In R
R Programming: Mathematical Functions In R
 

Recently uploaded

Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
amitlee9823
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
AroojKhan71
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
amitlee9823
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
amitlee9823
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
only4webmaster01
 

Recently uploaded (20)

Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
Vip Mumbai Call Girls Marol Naka Call On 9920725232 With Body to body massage...
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Bommasandra Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men  🔝malwa🔝   Escorts Ser...
➥🔝 7737669865 🔝▻ malwa Call-girls in Women Seeking Men 🔝malwa🔝 Escorts Ser...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 9155563397 👗 Top Class Call Girl Service B...
 

Market Basket Analysis in R

  • 1. 1
  • 2. Connect With Us Website ( ) Free Online R Courses ( ) R Packages ( ) Shiny Apps ( ) Blog ( ) GitHub ( ) YouTube ( ) Twitter ( ) Facebook ( ) Linkedin ( ) • https://www.rsquaredacademy.com/ • https://rsquared-academy.thinkific.com/ • https://pkgs.rsquaredacademy.com • https://apps.rsquaredacademy.com • https://blog.rsquaredacademy.com • https://github.com/rsquaredacademy • https://www.youtube.com/user/rsquaredin/ • https://twitter.com/rsquaredacademy • https://www.facebook.com/rsquaredacademy/ • https://in.linkedin.com/company/rsquared-academy 2
  • 3. Resources • Slides • Code & Data • RStudio Cloud 3
  • 5. 5
  • 6. 6
  • 7. 7
  • 8. 8
  • 9. 9
  • 10. 10
  • 11. 11
  • 12. 12
  • 13. 13
  • 14. 14
  • 15. 15
  • 16. 16
  • 17. 17
  • 18. 18
  • 20. Data Dictionary invoice number stock code description quantity invoice date unit price customer id country • • • • • • • • 20
  • 22. Read Data basket_data <- read.transactions("transaction_data.csv", format = "baske sep = ",") basket_data ## transactions in sparse format with ## 25901 transactions (rows) and ## 10085 items (columns) 22
  • 23. Data Summary summary(basket_data) ## transactions as itemMatrix in sparse format with ## 25901 rows (elements/itemsets/transactions) and ## 10085 columns (items) and a density of 0.001660018 ## ## most frequent items: ## WHITE HANGING HEART T-LIGHT HOLDER REGENCY CAKESTAND 3 TIER ## 1999 1914 ## JUMBO BAG RED RETROSPOT PARTY BUNTING ## 1806 1488 ## LUNCH BAG RED RETROSPOT (Other) ## 1404 425005 ## ## element (itemset/transaction) length distribution: ## sizes ## 0 1 2 3 4 5 6 7 8 9 10 11 12 13 ## 1454 4578 1727 1208 942 891 781 715 696 683 612 642 547 530 ## 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ## 555 537 479 459 491 428 405 328 311 280 248 261 235 221 23
  • 24. 24
  • 25. Generate Rules rules <- apriori(basket_data, parameter = list(supp=0.009, conf=0.8, target = "rules", maxlen = 4)) ## Apriori ## ## Parameter specification: ## confidence minval smax arem aval originalSupport maxtime support mi ## 0.8 0.1 1 none FALSE TRUE 5 0.009 ## maxlen target ext ## 4 rules FALSE ## ## Algorithmic control: ## filter tree heap memopt load sort verbose ## 0.1 TRUE TRUE FALSE TRUE 2 TRUE ## ## Absolute minimum support count: 233 ## ## set item appearances ...[0 item(s)] done [0.00s]. ## set transactions ...[10085 item(s), 25901 transaction(s)] done [1.41s ## sorting and recoding items [508 item(s)] done [0 03s] ## Warning in apriori(basket_data, parameter = list(supp = 0.009, conf = ## 0.8, : Mining stopped (maxlen reached). Only patterns up to a length ## returned! 25
  • 26. Rules Summary summary(rules) ## set of 22 rules ## ## rule length distribution (lhs + rhs):sizes ## 2 3 4 ## 11 9 2 ## ## Min. 1st Qu. Median Mean 3rd Qu. Max. ## 2.000 2.000 2.500 2.591 3.000 4.000 ## ## summary of quality measures: ## support confidence lift count ## Min. :0.009034 Min. :0.8035 Min. :22.59 Min. :234.0 ## 1st Qu.:0.010453 1st Qu.:0.8530 1st Qu.:25.02 1st Qu.:270.8 ## Median :0.013223 Median :0.8868 Median :55.94 Median :342.5 ## Mean :0.012760 Mean :0.9120 Mean :48.55 Mean :330.5 ## 3rd Qu.:0.014362 3rd Qu.:1.0000 3rd Qu.:61.23 3rd Qu.:372.0 ## Max. :0.018339 Max. :1.0000 Max. :71.30 Max. :475.0 ## 26
  • 27. Inspect Rules basket_rules <- sort(rules, by = 'confidence', decreasing = TRUE) inspect(basket_rules[1:10]) ## lhs rhs ## [1] {BACK DOOR} => {KEY FOB} ## [2] {SET 3 RETROSPOT TEA} => {SUGAR} ## [3] {SUGAR} => {SET 3 RETROSPOT TEA} ## [4] {SET 3 RETROSPOT TEA} => {COFFEE} ## [5] {SUGAR} => {COFFEE} ## [6] {SHED} => {KEY FOB} ## [7] {SET 3 RETROSPOT TEA, ## SUGAR} => {COFFEE} ## [8] {COFFEE, ## SET 3 RETROSPOT TEA} => {SUGAR} ## [9] {COFFEE, ## SUGAR} => {SET 3 RETROSPOT TEA} ## [10] {PINK REGENCY TEACUP AND SAUCER, ## REGENCY CAKESTAND 3 TIER, ## ROSES REGENCY TEACUP AND SAUCER} => {GREEN REGENCY TEACUP AND S 27
  • 28. 28
  • 29. 29
  • 30. 30
  • 31. Redundant Rules inspect(rules[is.redundant(rules)]) ## lhs rhs support ## [1] {SET 3 RETROSPOT TEA,SUGAR} => {COFFEE} 0.01436238 ## [2] {COFFEE,SET 3 RETROSPOT TEA} => {SUGAR} 0.01436238 ## [3] {COFFEE,SUGAR} => {SET 3 RETROSPOT TEA} 0.01436238 ## confidence lift count ## [1] 1 55.94168 372 ## [2] 1 69.62634 372 ## [3] 1 69.62634 372 31
  • 32. Non Redundant Rules inspect(rules[!is.redundant(rules)]) ## lhs rhs ## [1] {REGENCY TEA PLATE PINK} => {REGENCY TEA PLATE GREEN ## [2] {BACK DOOR} => {KEY FOB} ## [3] {SET 3 RETROSPOT TEA} => {SUGAR} ## [4] {SUGAR} => {SET 3 RETROSPOT TEA} ## [5] {SET 3 RETROSPOT TEA} => {COFFEE} ## [6] {COFFEE} => {SET 3 RETROSPOT TEA} ## [7] {SUGAR} => {COFFEE} ## [8] {COFFEE} => {SUGAR} ## [9] {REGENCY TEA PLATE GREEN} => {REGENCY TEA PLATE ROSES ## [10] {SHED} => {KEY FOB} ## [11] {SET/6 RED SPOTTY PAPER CUPS} => {SET/6 RED SPOTTY PAPER ## [12] {SET/20 RED RETROSPOT PAPER NAPKINS, ## SET/6 RED SPOTTY PAPER CUPS} => {SET/6 RED SPOTTY PAPER ## [13] {PINK REGENCY TEACUP AND SAUCER, ## ROSES REGENCY TEACUP AND SAUCER} => {GREEN REGENCY TEACUP AN ## [14] {GREEN REGENCY TEACUP AND SAUCER, ## PINK REGENCY TEACUP AND SAUCER} => {ROSES REGENCY TEACUP AN 32
  • 33. What influenced purchase of product X? sugar_rules <- apriori(basket_data, parameter = list(supp = 0.009, conf appearance = list(default = "lhs", rhs = "SUGAR")) ## Apriori ## ## Parameter specification: ## confidence minval smax arem aval originalSupport maxtime support mi ## 0.8 0.1 1 none FALSE TRUE 5 0.009 ## 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: 233 ## ## set item appearances ...[1 item(s)] done [0.00s]. ## set transactions ...[10085 item(s), 25901 transaction(s)] done [1.32s ## sorting and recoding items [508 item(s)] done [0 03s] 33
  • 34. What influenced purchase of product X? rules_sugar <- sort(sugar_rules, by = "confidence", decreasing = TRUE) inspect(rules_sugar) ## lhs rhs support confidence lif ## [1] {SET 3 RETROSPOT TEA} => {SUGAR} 0.01436238 1.0000000 69. ## [2] {COFFEE,SET 3 RETROSPOT TEA} => {SUGAR} 0.01436238 1.0000000 69. ## [3] {COFFEE} => {SUGAR} 0.01436238 0.8034557 55. ## count ## [1] 372 ## [2] 372 ## [3] 372 34
  • 35. What purchases did product X influence? sugar_rules <- apriori(basket_data, parameter = list(supp = 0.009, conf appearance = list(default = "rhs", lhs = "SUGAR")) ## Apriori ## ## Parameter specification: ## confidence minval smax arem aval originalSupport maxtime support mi ## 0.8 0.1 1 none FALSE TRUE 5 0.009 ## 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: 233 ## ## set item appearances ...[1 item(s)] done [0.00s]. ## set transactions ...[10085 item(s), 25901 transaction(s)] done [1.35s ## sorting and recoding items [508 item(s)] done [0 03s] 35
  • 36. What purchases did product X influence? rules_sugar <- sort(sugar_rules, by = "confidence", decreasing = TRUE) inspect(rules_sugar) ## lhs rhs support confidence lift c ## [1] {SUGAR} => {SET 3 RETROSPOT TEA} 0.01436238 1 69.62634 3 ## [2] {SUGAR} => {COFFEE} 0.01436238 1 55.94168 3 36
  • 37. Top Rules by Support supp_rules <- sort(rules, by = 'support', decreasing = TRUE) top_rules <- supp_rules[1:10] inspect(top_rules) ## lhs rhs ## [1] {PINK REGENCY TEACUP AND SAUCER, ## ROSES REGENCY TEACUP AND SAUCER} => {GREEN REGENCY TEACUP AND S ## [2] {GREEN REGENCY TEACUP AND SAUCER, ## PINK REGENCY TEACUP AND SAUCER} => {ROSES REGENCY TEACUP AND S ## [3] {SET 3 RETROSPOT TEA} => {SUGAR} ## [4] {SUGAR} => {SET 3 RETROSPOT TEA} ## [5] {SET 3 RETROSPOT TEA} => {COFFEE} ## [6] {COFFEE} => {SET 3 RETROSPOT TEA} ## [7] {SUGAR} => {COFFEE} ## [8] {COFFEE} => {SUGAR} ## [9] {SET 3 RETROSPOT TEA, ## SUGAR} => {COFFEE} ## [10] {COFFEE, ## SET 3 RETROSPOT TEA} => {SUGAR} 37
  • 38. Top Rules by Confidence conf_rules <- sort(rules, by = 'confidence', decreasing = TRUE) top_rules <- conf_rules[1:10] inspect(top_rules) ## lhs rhs ## [1] {BACK DOOR} => {KEY FOB} ## [2] {SET 3 RETROSPOT TEA} => {SUGAR} ## [3] {SUGAR} => {SET 3 RETROSPOT TEA} ## [4] {SET 3 RETROSPOT TEA} => {COFFEE} ## [5] {SUGAR} => {COFFEE} ## [6] {SHED} => {KEY FOB} ## [7] {SET 3 RETROSPOT TEA, ## SUGAR} => {COFFEE} ## [8] {COFFEE, ## SET 3 RETROSPOT TEA} => {SUGAR} ## [9] {COFFEE, ## SUGAR} => {SET 3 RETROSPOT TEA} ## [10] {PINK REGENCY TEACUP AND SAUCER, ## REGENCY CAKESTAND 3 TIER, ## ROSES REGENCY TEACUP AND SAUCER} => {GREEN REGENCY TEACUP AND S 38
  • 39. Top Rules by Lift lift_rules <- sort(rules, by = 'lift', decreasing = TRUE) top_rules <- lift_rules[1:10] inspect(top_rules) ## lhs rhs suppo ## [1] {REGENCY TEA PLATE PINK} => {REGENCY TEA PLATE GREEN} 0.0090344 ## [2] {SET 3 RETROSPOT TEA} => {SUGAR} 0.0143623 ## [3] {SUGAR} => {SET 3 RETROSPOT TEA} 0.0143623 ## [4] {COFFEE, ## SET 3 RETROSPOT TEA} => {SUGAR} 0.0143623 ## [5] {COFFEE, ## SUGAR} => {SET 3 RETROSPOT TEA} 0.0143623 ## [6] {BACK DOOR} => {KEY FOB} 0.0096135 ## [7] {SHED} => {KEY FOB} 0.0112736 ## [8] {REGENCY TEA PLATE GREEN} => {REGENCY TEA PLATE ROSES} 0.0103470 ## [9] {SET 3 RETROSPOT TEA} => {COFFEE} 0.0143623 ## [10] {COFFEE} => {SET 3 RETROSPOT TEA} 0.0143623 39
  • 40. 40
  • 41. 41
  • 42. 42
  • 43. 43
  • 44. 44
  • 45. 45
  • 46. Summary unsupervised data mining technique uncovers products frequently bought together creates if-then scenario rules cost-effective, insightful and actionable association rule mining has applications in several industries directionality of rule is lost while using lift confidence as a measure can be misleading • • • • • • • 46
  • 47. 47