Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第11章_Apriori算法 - ApacheCN #434

Closed
jiangzhonglian opened this issue Aug 24, 2018 · 4 comments
Closed

第11章_Apriori算法 - ApacheCN #434

jiangzhonglian opened this issue Aug 24, 2018 · 4 comments

Comments

@jiangzhonglian
Copy link
Member

jiangzhonglian commented Aug 24, 2018

https://ailearning.apachecn.org/#/docs/ml/11.使用Apriori算法进行关联分析

ApacheCN 专注于优秀项目维护的开源组织

@0Soul
Copy link

0Soul commented May 14, 2020

输出所有可能的候选项集 Ck的算法有错误吧,例如输入{0,1,2}, {1,2,3}K=4,此时应该有输出{0,1,2,3},提供的算法只比较列表的前两项,L1==L2才会输出

@Dream-Fu
Copy link

生成候选集的 createC1(dataSet)函数返回值应改成return list(map(frozenset, C1)),否则只能返回obj

@Dajielailin
Copy link

输出所有可能的候选项集 Ck的算法有错误吧,例如输入{0,1,2}, {1,2,3}K=4,此时应该有输出{0,1,2,3},提供的算法只比较列表的前两项,L1==L2才会输出

同样表示疑惑,看代码注释aprioriGen——应该是用来生成所有可能k+1维数据,但是L1 == L2就比较奇怪。。。

@Aevox121
Copy link

Aevox121 commented Jun 5, 2021

输出所有可能的候选项集 Ck的算法有错误吧,例如输入{0,1,2}, {1,2,3}K=4,此时应该有输出{0,1,2,3},提供的算法只比较列表的前两项,L1==L2才会输出

同样表示疑惑,看代码注释aprioriGen——应该是用来生成所有可能k+1维数据,但是L1 == L2就比较奇怪。。。

输出所有可能的候选项集 Ck的算法有错误吧,例如输入{0,1,2}, {1,2,3}K=4,此时应该有输出{0,1,2,3},提供的算法只比较列表的前两项,L1==L2才会输出

这里应该没有错误,输入为{0,1,2}和{1,2,3}的时候是一定还有一个输入为{0,1,3},{0,1,2}和{0,1,3}就能组合成{0,1,2,3}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants