[Stack 7/17] Fix D4: pseudocount formula#2514
Open
jucor wants to merge 1 commit intospr/edge/c0a682ecfrom
Open
[Stack 7/17] Fix D4: pseudocount formula#2514jucor wants to merge 1 commit intospr/edge/c0a682ecfrom
jucor wants to merge 1 commit intospr/edge/c0a682ecfrom
Conversation
This was referenced Mar 30, 2026
Open
Open
4ad6046 to
603f0ac
Compare
## Summary - Change `PSEUDO_COUNT` from 1.5 to 2.0, matching Clojure's Beta(2,2) prior - This changes probability smoothing from `pa = (na + 0.75)/(ns + 1.5)` to `pa = (na + 1)/(ns + 2)` - All `pa`/`pd` values now match Clojure's `p-success` exactly (verified on all datasets with Clojure blobs) ## Changes - `repness.py`: `PSEUDO_COUNT = 2.0` with updated comment - `test_discrepancy_fixes.py`: remove xfail from 3 D4 tests (constant check, pa values per dataset, synthetic) - `test_repness_unit.py`, `test_old_format_repness.py`: import `PSEUDO_COUNT` instead of hardcoding 1.5 - `simplified_repness_test.py`: update hardcoded constant - Golden snapshots re-recorded for public datasets (vw, biodiversity) ## Test plan - [x] TDD red: 6 D4 tests fail before fix - [x] TDD green: all 6 D4 tests pass after fix - [x] Full public suite: 258 passed, 0 failures - [x] Private datasets (--include-local): 60 passed, 0 failures (discrepancy tests) - [x] Regression tests pass on public + FLI + bg2018 🤖 Generated with [Claude Code](https://claude.com/claude-code) ## Squashed commits - Fix D4: PSEUDO_COUNT 1.5 → 2.0 to match Clojure's Beta(2,2) prior - Journal: add session 6 (D4 fix), update plan marking D4 done commit-id:6ae3ee43
603f0ac to
b9dcc89
Compare
Delphi Coverage Report
|
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
PSEUDO_COUNTfrom 1.5 to 2.0, matching Clojure's Beta(2,2) priorpa = (na + 0.75)/(ns + 1.5)topa = (na + 1)/(ns + 2)pa/pdvalues now match Clojure'sp-successexactly (verified on all datasets with Clojure blobs)Changes
repness.py:PSEUDO_COUNT = 2.0with updated commenttest_discrepancy_fixes.py: remove xfail from 3 D4 tests (constant check, pa values per dataset, synthetic)test_repness_unit.py,test_old_format_repness.py: importPSEUDO_COUNTinstead of hardcoding 1.5simplified_repness_test.py: update hardcoded constantTest plan
🤖 Generated with Claude Code
Squashed commits
commit-id:6ae3ee43
Stack: