我熟悉apriori算法,以及支持/置信/提升的含义.
我目前使用的apyori先验落实,我不知道我理解的输出的的apyori.apriori()电话.
就像这样
> RelationRecord(items=frozenset({'item1', 'item2'}),
> support=0.15365410803449842,
> ordered_statistics=[OrderedStatistic(items_base=frozenset({'item1'}),
> items_add=frozenset({'item2'}), confidence=0.6203420891875382,
> lift=2.2233410344037092),
> OrderedStatistic(items_base=frozenset({'item2'}),
> items_add=frozenset({'item1'}), confidence=0.5507049891540131,
> lift=2.2233410344037097)])
Run Code Online (Sandbox Code Playgroud)
规则是什么?有多个支持/信心/提升,每个人表示什么?
我很欣赏输出的每个部分的字典样式解释
Zax*_*axR 10
RelationRecord反映了项的子集,而ordered_statistics是OrderedStatistics的列表,它反映了规则.每个OrderedStatistics的items_base都是前提,而items_add是结果.支持存储在RelationRecord中,因为它对于包含的规则是相同的.
在你的例子中:
item1 - > item2,置信度为0.62,升力为2.2233410344037092x
item2 - > item1,置信度为0.55,升力为2.2233410344037097x
两者都有支持= 0.15365410803449842.
为了它的价值,我最终转而使用PyFIM来获得相对功能丰富性和其他捆绑算法(例如fp-growth).
| 归档时间: |
|
| 查看次数: |
4006 次 |
| 最近记录: |