Skip to content

Prune zero-support rules in prune_harmful_rules - #44

Merged
adaamko merged 1 commit into
mainfrom
fix/prune-dead-rules
Jul 31, 2026
Merged

Prune zero-support rules in prune_harmful_rules#44
adaamko merged 1 commit into
mainfrom
fix/prune-dead-rules

Conversation

@adaamko

@adaamko adaamko commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Implements the stricter dead-rule pruning from #4: rules with validated_support < min_support (default 1) are dropped alongside negative-marginal rules. Zero-support rules have marginal F1 of exactly 0.0, which the existing threshold can never catch.

Supersedes #26, which implemented the same design but stalled without the contribution-rights attestation; this is an independent implementation.

  • I certify that I have the right to submit this contribution under the project's Apache-2.0 license.

🤖 Generated with Claude Code

A rule that never fires on the eval split has marginal F1 of exactly
0.0, so the min_marginal_f1 threshold can never drop it and it survives
as dead weight. prune_harmful_rules now also drops rules whose
validated_support is below min_support (default 1); min_support=0
restores the old behavior. The library call site (engine.rank_rules)
stamps validated_support via rank_rules before pruning.

Closes #4
@adaamko
adaamko merged commit 3cae480 into main Jul 31, 2026
6 checks passed
@adaamko
adaamko deleted the fix/prune-dead-rules branch July 31, 2026 14:03
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

Successfully merging this pull request may close these issues.

1 participant