Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is the code block itemset.count(item) < length - 1 necessary in apriori_algorithm.py? #12943

Open
Labels
awaiting triageAwaiting triage from a maintainer
@phanngoctuan1990

Description

What would you like to share?

Hi,

I noticed the following code in apriori_algorithm.py:

if item not in itemset or itemset.count(item) < length - 1:

From my testing with standard datasets (where each item appears at most once in an itemset), the block or itemset.count(item) < length - 1 never seems to be triggered. Is this condition necessary, or could it be removed for cleaner code?

Thank you!

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting triageAwaiting triage from a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /