Skip to content

Clarify entropy conventions and repair quantile documentation links - #181

Merged
jmh530 merged 3 commits into
libmir:masterfrom
jmh530:codex/clarify-univariate-docs
Oct 19, 2026
Merged

jmh530 merged 3 commits into
libmir:masterfrom
jmh530:codex/clarify-univariate-docs

Conversation

@jmh530

@jmh530 jmh530 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Clarify that entropy and EntropyAccumulator compute sum(x * ln(x)) using natural logarithms, without normalization or negation. Document nonnegative input requirements, zero contributions, and the relationship to Shannon entropy in nats. Examples distinguish the existing calculation from entropy computed after normalizing inputs.

Repair 27 quantile documentation references pointing to eight unresolved enum-member anchors. Also direct the accumulator’s sign-convention link to the standalone entropy function rather than its similarly named property.

These changes affect documentation only; implementation behavior is unchanged.

Validation:

  • Rebuilt the affected HTML pages with pinned LDC 1.43.
  • No unresolved same-page links remain on the entropy or quantile pages.
  • All 404 legacy univariate anchors and 245 previous moments anchors resolve.
  • Verified the entropy cross-reference targets the standalone function’s unique anchor.
  • DMD documentation and whitespace checks passed.
  • Rebased onto current upstream master; all three patches remain unchanged.

AI-Assisted-By: Codex (GPT-6 Astra Medium)

Document that entropy and EntropyAccumulator compute sum(x * ln(x))
using natural logarithms, without normalizing inputs or negating
the result. For normalized probabilities, this is the negative of
Shannon entropy in nats.

Describe nonnegative input requirements, zero contributions, and
assertions for negative inputs. Use examples to distinguish the
existing sum from entropy calculated after normalization.

AI-Assisted-By: Codex (GPT-6 Astra Medium)
Qualified enum-member references omitted the leading dot used by
generated Ddoc anchors, leaving links to eight distinct targets
unresolved.

Replace the 27 affected references with explicit links to the
generated anchors while preserving their displayed names. Cover
both ordinary and weighted quantile algorithm references without
changing implementation behavior.

AI-Assisted-By: Codex (GPT-6 Astra Medium)
Use the canonical .entropy anchor for the sign-convention link.
The short entropy anchor first resolves to the accumulator property,
which does not contain the referenced explanation.

AI-Assisted-By: Codex (GPT-6 Astra Medium)
@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jmh530
jmh530 merged commit 0c7cf5d into libmir:master Oct 19, 2026
26 checks passed
@jmh530
jmh530 deleted the codex/clarify-univariate-docs branch October 19, 2026 00:20
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