Prune zero-support rules in prune_harmful_rules - #44
Merged
Conversation
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
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.
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.
🤖 Generated with Claude Code