为关联规则创建交互式副坐标图

信徒

我用先验算法为关联规则创建了一个模型,我有两个问题:

1)我可以在模型可视化中使用“图形”图的任何交互式图吗?在此处输入图片说明2) 我可以将普通的“paracoord”绘图转换为交互式 plot_ly“paracoord”吗?在此处输入图片说明

这是我的带有示例数据的代码:

>summary(topRules)

20条规则

rule length distribution (lhs + rhs):sizes
 4  5  6  7 
 1  4 11  4 

   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   4.00    5.75    6.00    5.90    6.00    7.00 

summary of quality measures:
    support          confidence          lift           count      
 Min.   :0.01006   Min.   :0.9455   Min.   :1.763   Min.   :164.0  
 1st Qu.:0.01035   1st Qu.:0.9486   1st Qu.:1.772   1st Qu.:168.8  
 Median :0.01098   Median :0.9526   Median :1.781   Median :179.0  
 Mean   :0.01145   Mean   :0.9535   Mean   :2.293   Mean   :186.8  
 3rd Qu.:0.01173   3rd Qu.:0.9561   3rd Qu.:1.796   3rd Qu.:191.2  
 Max.   :0.01631   Max.   :0.9686   Max.   :5.218   Max.   :266.0  

mining info:
 data ntransactions support confidence
   tr         16308    0.01        0.5
plot(topRules, method = "graph")
plot(topRules, method="paracoord",control=list(reorder=TRUE))


toprulesample<- structure(list(rules = structure(c(15L, 16L, 19L, 2L, 9L, 12L, 
3L, 1L, 14L, 4L, 6L, 11L, 5L, 18L, 13L, 7L, 17L, 20L, 10L, 8L
), .Label = c("{Arugula,Carrot,Cucumber,Golden Onion,Green pepper} => {Tomato}", 
"{Arugula,Carrot,frying Potato,Golden Onion,Green pepper} => {Tomato}", 
"{Arugula,Cucumber,frying Potato,Golden Onion,Green pepper} => {Tomato}", 
"{Baladi Cabbage,Coriander,Parsley,Tomato} => {Dill}", "{Baladi Cabbage,Coriander,Parsley} => {Dill}", 
"{Capsicum,Carrot,frying Potato,Green pepper,Red Onion} => {Tomato}", 
"{Capsicum,Coriander,Dill,frying Potato,Golden Onion} => {Tomato}", 
"{Capsicum,Coriander,frying Potato,Golden Onion} => {Tomato}", 
"{Carrot,Cucumber,frying Potato,Green pepper,Red Onion} => {Tomato}", 
"{Carrot,Dill,frying Potato,Green pepper,Local Lemon,Parsley} => {Tomato}", 
"{Carrot,frying Potato,Golden Onion,Green pepper,Local Lemon,Zucchini} => {Tomato}", 
"{Carrot,frying Potato,Golden Onion,Green pepper,NULL,Zucchini} => {Tomato}", 
"{Carrot,frying Potato,Golden Onion,Green pepper,Red Onion} => {Tomato}", 
"{Carrot,frying Potato,Green pepper,Local Banana,Local Lemon,Zucchini} => {Tomato}", 
"{Carrot,frying Potato,Green pepper,Red Onion,Zucchini} => {Tomato}", 
"{Coriander,frying Potato,Green pepper,Local Lemon,Zucchini} => {Tomato}", 
"{Coriander,Parsley,Tomato,White Eggplant} => {Dill}", "{Dill,frying Potato,Green pepper,Local Lemon,Zucchini} => {Tomato}", 
"{frying Potato,Green pepper,Local Lemon,Red Onion,Zucchini} => {Tomato}", 
"{frying Potato,Green pepper,Red Onion,Zucchini} => {Tomato}"
), class = "factor"), support = c(0.0113441255825362, 0.0117120431689968, 
0.0109148883983321, 0.0101790532254108, 0.0123252391464312, 0.0106082904096149, 
0.0103630120186412, 0.0103016924208977, 0.0101790532254108, 0.0111601667893059, 
0.011037527593819, 0.0109148883983321, 0.0142261466764778, 0.0117733627667403, 
0.0102403728231543, 0.010056414029924, 0.0109148883983321, 0.0163110129997547, 
0.0117120431689968, 0.0127544763306353), confidence = c(0.968586387434555, 
0.964646464646465, 0.962162162162162, 0.959537572254335, 0.957142857142857, 
0.955801104972376, 0.954802259887006, 0.954545454545455, 0.954022988505747, 
0.952879581151832, 0.952380952380952, 0.951871657754011, 0.950819672131147, 
0.95049504950495, 0.948863636363636, 0.947976878612717, 0.946808510638298, 
0.94661921708185, 0.945544554455445, 0.945454545454545), lift = c(1.80646235204514, 
1.79911419778757, 1.7944808486437, 1.78958585639567, 1.78511959221017, 
1.78261715689496, 1.78075426054864, 1.78027530566414, 1.77930088020948, 
5.2181196136414, 1.77623840020912, 1.77528854010206, 5.20683922535754, 
1.77272109644633, 1.76967842884471, 1.7680245810174, 5.18487346927111, 
1.76549247394451, 1.76348817406901, 1.76332030275306), count = c(185, 
191, 178, 166, 201, 173, 169, 168, 166, 182, 180, 178, 232, 192, 
167, 164, 178, 266, 191, 208)), .Names = c("rules", "support", 
"confidence", "lift", "count"), row.names = c(42557L, 47757L, 
42552L, 43429L, 42696L, 53931L, 43434L, 43439L, 54111L, 21204L, 
42597L, 53917L, 4762L, 50102L, 42535L, 45432L, 21212L, 26421L, 
53833L, 35432L), class = "data.frame")


plot_ly(toprulesample,type = 'parcoords')
迈克尔·哈斯勒

如果您拥有最新版本的 arulesViz(版本 1.3-0 及更高版本),那么您可以尝试plot(topRules, method = "graph", engine = "htmlwidget")获取交互式图表。

现在最新版本中有几个新的交互式绘图可用。查看https://journal.r-project.org/archive/2017/RJ-2017-047/RJ-2017-047.pdf了解更多信息。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

为命令创建交互式外壳

来自分类Dev

用libgdx创建交互式动画

来自分类Dev

如何创建交互式USSD菜单?

来自分类Dev

如何使用Vaadin创建交互式图形?

来自分类Dev

创建交互式SVG HTML表单的最佳方法

来自分类Dev

Web库创建交互式流程图

来自分类Dev

如何使用WPF创建交互式图形?

来自分类Dev

创建交互式登录会话窗口7

来自分类Dev

创建交互式SVG HTML表单的最佳方法

来自分类Dev

在 pexpect 中创建交互式选项

来自分类Dev

在 R 中创建交互式绘图

来自分类Dev

使用HTML5,CSS3,Javascript创建交互式地图

来自分类Dev

如何使用Swift Cocoa Touch创建交互式动画

来自分类Dev

在网站上创建交互式图R图

来自分类Dev

如何使用Python脚本在Paraview中创建交互式窗口?

来自分类Dev

如何使用Node JS创建交互式控制台界面?

来自分类Dev

如何在大数据集上创建交互式图形?

来自分类Dev

Vue-如何为文本区域和输入字段创建交互式功能?

来自分类Dev

如何在python中使用MySql数据创建交互式列表

来自分类Dev

Vue D3JS创建交互式甜甜圈图

来自分类Dev

如何创建交互式图纸管理器?

来自分类Dev

如何在我的React JS应用中创建交互式复选框?

来自分类Dev

意见建议:创建交互式3D点密度图

来自分类Dev

如何在Angular中创建交互式Google图表(UI事件)?

来自分类Dev

在网站上创建交互式图R图

来自分类Dev

如何使用等高线(填充)绘图层创建交互式在线地图?

来自分类Dev

如何使用WebGL在JavaScript中创建交互式全景查看器?

来自分类Dev

three.jsl-如何创建交互式鼠标控制的360度图像?

来自分类Dev

您可以使用字符串拆分创建交互式菜单吗?

Related 相关文章

热门标签

归档