【发布时间】:2015-03-23 07:26:17
【问题描述】:
我有一个规则的 excel 文件:一列用于前因,另一列用于后果,其他用于支持等
我正在尝试创建一个“规则”对象以使用 arulesViz 绘制它们。
http://www.inside-r.org/packages/cran/arules/docs/rhs
new("rules", ...)
我正在尝试创建插槽
lhs:Object of class itemMatrix; the left-hand-sides of the rules (antecedents)
rhs:Object of class itemMatrix; the right-hand-sides of the rules (consequents)
quality:a data.frame
要创建 itemMatrix 我需要回到稀疏矩阵,但我认为这行不通,有没有办法将规则“导入”到 arulesViz?
Excel 文件:
Antec Conseq Supp Conf
MMMMAAA MMAAAA 0.061945 0.5
MMM,MA MMAAAA 0.071944 0.6
MMMMAAA MMAAA 0.053948 0.5
MMM,MA MMAAA 0.054948 0.7
AAAAAA AAAA 0.090909 0.5
【问题讨论】:
标签: arules