【代码贡献】完善 QARM 高阶关联规则枚举 - #55
Open
woahwhattheheck wants to merge 1 commit into
Open
Conversation
This was referenced Sep 8, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Related to #13.
QARM currently derives confidence rules by comparing each frequent k-itemset only with frequent (k-1)-itemsets. For a frequent 3-itemset such as
{A,B,C}, that emits the 2→1 rules but misses valid 1→2 rules such asA->B,C.This contribution keeps the existing quantum frequent-itemset search unchanged and extends only association-rule enumeration:
dictresult shape;pyqpanda_alg.QARM.QuantumAssociationRulesMiningpackage API while retaining the original QARM implementation as the base class.Validation
Focused deterministic fixture validation covers all 12 expected rules across frequent 2- and 3-itemsets, higher-order rules under a confidence threshold, and deterministic key formatting for unordered sets. Syntax compilation also passes. The current local runtime does not include
pyqpanda3, so I am not claiming a full native repository test run; fork-hosted validation is queued and maintainer CI remains authoritative.This scope is intentionally separate from #50: that PR changes QARM search correctness in
qarm.pyand explicitly leaves higher-order_get_all_conf()rule enumeration unresolved. The paths are disjoint, and this subclass composes on top of the base QARM implementation.Base
develop:5f973efccb84bc193157d1ccebe32137e307293b. Exact head:c74d9273bdd87d4e9aacacceb25cf155c9d8dbc8. Diff: 3 paths, +111/-1.Prepared with AI assistance for TokenJunkieLabs; operated by @woahwhattheheck.