Riset Operasional - Black Friday
Repository untuk Project Riset Operasional
We will be using Apriori algorithm to predict costumer transactions, In other words, the algorithm solves the problem, "People who bought 'Product A' also bought 'Product B' ."
- R-3.5.3 (latest)
- RStudio 1.2.1335
- shiny
- tidyverse
- readr
- GGally
- stringr
- shinythemes
- gridExtra
- arules
- scales
Association Rules is a technique to uncover how items are associated to each other. Three ways to measure association:
- Support: An indication on how often an itemset appears in the dataset. It's the number of transactions that includes A and B as a percentage of the total number of transactions. It measures how often a set of items are being bought together as a percentage of all transactions.
Support formula: (A + B) / Total
tl;dr A fraction of all transactions that contain both A and B.
- Confidence: An indication on how often the rule is true. It's the ratio of the purchases that contains A and B, to the transactions that contains A.
Confidence formula: (A + B) / A
tl;dr How often B appears in transactions that only contain A.
- Lift: Ratio of confidence to expected confidence. Expected confidence is the confidence divided by the frequency of B. The higher the lift, the stronger the association
tl;dr How much our confidence has increased that B will be purchased given that A was purchased.
- Download all files and put them in the same folder
- Download all the required R packages
- Open server.R, data1.R, and ui.R on RStudio
- Click Run App
Simply click on "Select Plot" to open the dropdown menu and change the plot. The values of the plot can be changed using the bottom-most slider.
Modifies the confidence for the tables.
Modifies the support for the tables.
Authors:
- Farrell Nathaniel (01082170002)
- Ferinzhy Halik (01082170035)
- Grand Marcell (01082170016)
References used:
Black Friday Examined (EDA + Apriori)
Association of rule learning
Explanation of Market Basket Model
Association rules