interactive association rules exploration app
来源:互联网 发布:社保网络认证软件下载 编辑:程序博客网 时间:2024/05/22 17:08
In a previous post, I wrote about what I use association rules for and mentioned a Shiny application I developed to explore and visualize rules. This post is about that app. The app is mainly a wrapper around the arules and arulesViz packages developed by Michael Hahsler.
Features
- train association rules
- interactively adjust confidence and support parameters
- sort rules
- sample just top rules to prevent crashes
- post process rules by subsetting LHS or RHS to just variables/items of interest
- suite of interest measures
- visualize association rules
- grouped plot, matrix plot, graph, scatterplot, parallel coordinates, item frequency
- export association rules to CSV
How to get
Option 1: Copy the code below from the arules_app.R gist
Option2: Source gist directly.
library('devtools')library('shiny')library('arules')library('arulesViz')source_gist(id='706a28f832a33e90283b')
Option 3: Download the Rsenal package (my personal R package with a hodgepodge of data science tools) and use the arulesApp
function:
library('devtools')install_github('brooksandrew/Rsenal')library('Rsenal')?Rsenal::arulesApp
How to use
arulesApp
is intended to be called from the R console for interactive and exploratory use. It calls shinyApp
which spins up a Shiny app without the overhead of having to worry about placing server.R and ui.R. Calling a Shiny app with a function also has the benefit of smooth passing of parameters and data objects as arguments. More on shinyApp
here.
arulesApp
is currently highly exploratory (and highly unoptimized). Therefore it works best for quickly iterating on rule training and visualization with low-medium sized datasets. Check out Michael Hahsler’s arulesViz paper for a thorough description of how to interpret the visualizations. There is a particularly useful table on page 24 which compares and summarizes the visualization techniques.
Simply call arulesApp
from the console with a data.frame or transaction set for which rules will be mined from:
library('arules') contains Adult and AdultUCI datasetsdata('Adult') # transaction setarulesApp(Adult, vars=40)data('AdultUCI') # data.framearulesApp(AdultUCI)
Here are the arguments:
dataset
data.frame, this is the dataset that association rules will be mined from. Each row is treated as a transaction. Seems to work OK when a the S4 transactions class fromarules is used, however this is not thoroughly tested.bin
logical, TRUE will automatically discretize/bin numerical data into categorical features that can be used for association analysis.vars
integer, how many variables to include in initial rule miningsupp
numeric, the support parameter for initializing visualization. Useful when it is known that a high support is needed to not crash computationally.conf
numeric, the confidence parameter for initializing visualization. Similarly useful when it is known that a high confidence is needed to not crash computationally.
Screenshots
Association rules list view
Scatterplot
Graph
Grouped Plot
Parallel Coordinates
Matrix
Item frequency
Code
- interactive association rules exploration app
- Interactive association rules exploration app
- Association Rules
- Association Rules--Apriori Algorithm
- 关联规则(Association Rules)
- Association Rules--FP-growth Algorithm
- Data Mining Week3 - Association Rules & Decision List
- Association Rules and the apriori algorithm
- Pass4Sure Telecommunications Industry Association Interactive Testing Engine and BrainDumps
- 关联规则( Association Rules)之频繁模式树(FP-Tree)
- 【论文笔记】Mining Association Rules in Spatio-Temporal Data
- Market Basket Analysis Using Association Rules in R
- Association
- 海量数据挖掘MMDS week2: Association Rules关联规则与频繁项集挖掘
- Rules
- Rules
- Rules
- Rules
- Android Voice-Write 学习开发过程
- php微信开发备忘-接收处理文本消息
- mysql交互式连接&非交互式连接
- C++项目中的extern "C" {}
- 设计模式个人理解总结
- interactive association rules exploration app
- shell脚本模拟多进程(讲的比较明白)
- http://www.cnblogs.com/heyonggang/p/3664565.html
- WindowManager.LayoutParams:(一:Flags)
- IO流--拷贝图片
- 网站开发进阶(二十三)Address already in use: JVM_Bind <null>:8088
- Android新建项目选择SDK的区别
- 如何跳到系统设置里的WiFi界面
- JavaScript图片加载和JQuery图片加载问题