ISSS608 2016-17 T3 Group8 Arules Final Projrct
|
|
|
|
Contents
Background on Association Rules
What is association rule mining?
- An association rule is a pattern that when an event occurs, another event occurs with a certain probability.
- Association rules are if/then statement that help undercover relationships between unrelated items. i.e. to find the relationships between the objects which are frequently bought together
- Association Rules find all sets of items (items set) that have support greater than the minimum support. Then using the large items to generate the desired rules that have confidence greater than the minimum confidence
- A typical and widely used example of association rules application is market basket analysis.It has an LHS and an RHS part and can be represented as itemset X => itemset Y. This means that the item/s on the right were frequently purchased along with items on the left.
Key indicators of Association Rules:
Description | Illustration |
---|---|
Support
|
|
Confidence
|
|
Lift
|
Generic VS Targeted Association Rule Mining
Although association rule mining is more commonly used for the market basket analysis, it can be used for other contexts as well. So instead of generically study the rules, we can also define a target of study, and use ARM to find out what combination of factors are more likely to lead to the occurrence of our target variable.In this case, the target of interest is always kept at RHS, as the consequent. A good example of the targeted ARM is demonstrated with the titanic data where people used association rule mining to see which group of passengers are likely to survive from titanic – the combination of passenger attributes shows that women and children are the ones survived.
[File:VRshiny_report_grp8_files_image007.png|500px|center]
Choice of Visualizations and Critics
This section discusses the choices of visualizations used in our application with respect to their usefulness. Critics on the default visualizations provided in the arulesviz packages will be discussed as well to the areas for improvement for our visualization designs.
Discussion | Visualization |
---|---|
Benefits of scatterplots
|
|
Benefits of network diagrams
|
Application Design at a Glance
Design Concepts | Dashboard |
---|---|
1.Load data dashboard
This dashboard allows the user to load their data for using our app
|
|
2.Dashboard for generic market basket analysis
This dashboard is designed for the generic MBA analysis, where we allow the users to have an overview of the individual rules before they choose one particular area to investigate.
|
|
3.Dashboard for Targeted ARM
This dashboard is designed for the targeted ARM analysis. Since the targeted ARM already has an targeted item of interest, we skipped the stats explorer part but added in more interactive features for the users to calibrate the model and investigate the items of their interest.
For example, the user can choose to view only the association network of the rules leading to a specific target variable.
|
Application Design in Details
1. Load data
1)Choose File to Upload |
Users can upload any dataset they want as long as they are in the following format:
1.Market Basket Analysis
2.Targeted ARM Any dataset that contains a target variable that the user is interested in. The users are able to choose if the dataset contains a header and the separator for the file. |
2.Import Data | Once the data file is uploaded and the users are ready to do the association rule mining on this dataset, they can click the “Import data” button and then the data would be imported into our server and saved as a data frame, which would be used for all the following data transformation, analyses and visualizations.
This is done by using “eventReactive” function in R shiny. To save a data frame dependent on user’s uploaded file, we make a reactive data frame that would be stored only when some event happens, which, in this case, is clicking on the “Import data” button. |
3.Variable Transformation
numeric_check=sapply(df1,is.numeric)
Transform numeric:
|
a) Transforming binary column Columns containing numbers of only 1 or 0 are considered as binary columns. (NA is allowed). Binary variables are recoded to “True” or “False” b) From the remaining columns, transform numeric columns to 3 bins “low, mid, high” based on quantiles.
c) Categorical columns: unchanged Users were educated in the user guide to not using numeric numbers to represent categorical information, otherwise they will be transformed in step 2. d) Combing the transformed columns and the original categorical columns back to form the new dataframe for association rule minng. |