Skip to content

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

Description

@phanngoctuan1990

What would you like to share?

Hi,

I noticed the following code in apriori_algorithm.py:

ifitemnotinitemsetoritemset.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

Activity

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

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