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

请问fpgrowth如何设置最大的物品组合数,如我仅需计算两两物品之间的关联度 #2

Open
Edw1998 opened this issue Apr 5, 2020 · 2 comments

Comments

@Edw1998
Copy link

Edw1998 commented Apr 5, 2020

No description provided.

@Edw1998 Edw1998 changed the title 请问如何设置最大的物品组合数,如我仅需计算两两物品之间的关联度 请问fpgrowth如何设置最大的物品组合数,如我仅需计算两两物品之间的关联度 Apr 5, 2020
@blackAndrechen
Copy link
Owner

算法的generate_L函数返回的是所有满足支持度的频繁项集L和各频繁项的支持度support_data,你可以根据需求由这两项生成自己需要的答案。

当然,若你只需生成最大长度为2的频繁项,在apriori算法中,只需将apriori.pygenerate_L函数中的while(True)删除即可,这将只生成频繁项大小为2的数据

@Edw1998
Copy link
Author

Edw1998 commented Apr 16, 2020

算法的generate_L函数返回的是所有满足支持度的交替项集L和各交替项的支持度support_data,你可以根据需求由这更多生成自己需要的答案。

当然,若您只需生成最大长度为2的重复项,在apriori算法中,只需将apriori.pygenerate_L函数中的while(True)删除即可,这将仅生成替换项大小为2的数据

那请问FP_growth算法中需要怎样修改呢?

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

No branches or pull requests

2 participants