首页 > 解决方案 > 显示随机数字项目集中的先验市场篮子

问题描述

嗨,我已经在 r 中运行了先验协会

#设置规则

association.rules = apriori(tr, parameter = list(supp=0.001, conf=0.10,minlen = 2, 
maxlen=5, target = "rules"))

#去除多余的规则

association.rules <- association.rules[!is.redundant(association.rules)]
rules_dt <- data.table( lhs = labels( lhs(association.rules) ), 
                    rhs = labels( rhs(association.rules) ), 
                    quality(association.rules) )[ order(-lift), ]

知道为什么某些项目集显示为数字吗?

LHS {107048}             RHS {REPLACED BY 68407}
    {CHEF TORCH HEAD}        {GAS CARTRIDGE}

我注意到这对数字的置信度为 1 而其余的则更少

summary (tr)
includes extended item information - examples:
                    labels
1                           10
2 100 FLOWER HONEY/ TOMIZ 110G
3                       107048

标签: rapriori

解决方案


推荐阅读