association_rules中的conviction是什么意思
时间: 2023-06-06 15:08:23 浏览: 41
Association_rules中的conviction表示置信度的度量。它描述了如果我们已经知道一个项目集中的项中的一个项出现了,那么另一个项在同一集合中出现的可能性有多大。如果conviction的值等于1,那么两个项是独立无关的。如果该值大于1,则两项之间是相关的,如果该值小于1,则两项之间是负相关的。
相关问题
association_rules()有哪些关键字
`support`、`confidence`、`lift`、`leverage`、`conviction`是`association_rules()`函数的关键字参数。其中:
- `support`表示项集出现的频率或支持度;
- `confidence`表示规则的置信度;
- `lift`表示规则的提升度;
- `leverage`表示规则的杠杆率;
- `conviction`表示规则的确信度。
解释一下 mlxtend association_rules 输出的结果解释一下
mlxtend是一个Python库,它提供了许多数据挖掘和机器学习工具,其中包括association rules挖掘。当使用mlxtend库的association_rules函数来挖掘频繁项集时,会返回一个DataFrame,其中包含每个频繁项集的支持度和置信度以及生成的关联规则及其对应的支持度、置信度和提升度等指标。
下面是一个示例输出结果:
```
antecedents consequents antecedent support \
0 (whole milk, whipped/sour cream) (bottled beer) 0.032232
1 (yogurt, curd) (bottled beer) 0.017895
2 (yogurt, other vegetables, pip fruit) (bottled beer) 0.010066
consequent support support confidence lift leverage conviction
0 0.080528 0.004723 0.146357 1.815564 0.002120 1.075696
1 0.080528 0.002540 0.141844 1.759754 0.001097 1.069501
2 0.080528 0.001016 0.101124 1.254802 0.000207 1.022807
```
在这个数据框中,`antecedents`和`consequents`列分别表示规则的前件和后件。`antecedent support`和`consequent support`分别表示前件和后件的支持度。`support`表示同时包含前件和后件的事务的支持度。`confidence`表示后件在给定前件的情况下出现的概率。`lift`表示规则的提升度,它衡量了后件在前件出现的情况下出现的概率与后件在总体中出现的概率之比。`leverage`表示规则的杠杆度,它衡量了前件和后件同时出现的频率与在独立情况下它们出现的频率之差。`conviction`表示规则的确信度,它衡量了后件不出现的情况下前件出现的概率与后件不出现的情况下前件不出现的概率之比。
通过查看这些指标,我们可以了解哪些规则是最有趣的和最有用的,从而可以做出更好的业务决策。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)