Repository navigation
Confidence: Jev's peak statistic, (n·peak − 1)/(n − 1), not normalized entropy - #1
Merged
Merged
Conversation
…d entropy TypeSafe defines confidence on choice and score answers as (n × peak − 1) / (n − 1): 0 when uniform, 1 when certain, with the worked example [0.90, 0.06, 0.04] → 0.85. jevify served one minus the normalized entropy under the same field name, which is systematically lower (0.64 on that example) and would have moved a client's threshold decisions. A reader of the NVIDIA forum thread caught it. The formula changes in the one statistics chokepoint; the tests assert TypeSafe's literals. ADR-0003 gains D8, invariants §5 is amended and the change is recorded in §7 with the previous wording. Committed scorecards that predate this keep their recorded numbers, as the ADR says. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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
confidenceonchoiceandscoreanswers did not carry Jev's meaning. TypeSafe defines it as(n × peak − 1) / (n − 1)(docs, worked example[0.90, 0.06, 0.04] → 0.85), and its published thresholds (act above 0.9, review 0.5–0.9, route to a human below 0.5) refer to that number. jevify served one minus the normalized entropy under the same field name, which is systematically lower and would have moved a client's threshold decisions. User ai.sling.42 in the NVIDIA forum thread caught it.Changes
jevify/domain/distribution.py: the one statistics chokepoint now computes Jev's peak statistic for choice and score. Noul is unchanged: Jev's noul carries no confidence, and jevify's distance-from-one-half stays underx_jevifyonly.tests/test_distribution.py: assertions use TypeSafe's literals (written red first).docs/adr/0003-jev-compatible-api.md: new D8; status line and index row updated.docs/00-invariants.md: §5 confidence rule amended, recorded in §7 with the previous wording.SKILL.md: one sentence saying whatconfidenceis.Committed scorecards under
docs/evidence/that predate this keep the entropy value in their wrong-case column and are not rewritten (a number in a document comes from a run); the reliability table bins on top probability and is unaffected.Proof
uv run pytest -m "not live and not encoder"green on the working tree (4 skips, as on main).uv run ruff check . && uv run ruff format --check .clean.uv run mypy jevify: 24 pre-existing errors, same count as main; none in the changed file.🤖 Generated with Claude Code