Repository navigation
Log-space Taylor override hook + API-docs reorg - #3
Merged
Merged
Conversation
Adds `Copula.log_generator_taylor_coefficients(t, k_max)` returning `(sign, log|c|)` for the normalized Taylor coefficients c_k = ψ^(k)(t)/k!. The Bell density already consumes coefficients as (sign, log|c|) internally, so a family whose closed-form series is computed in the log domain (e.g. AMH's Geometric-frailty logsumexp) can feed them straight in — instead of exponentiating to a possibly-overflowing float64 only for bell to take the log again. bell._root_assembly now prefers this hook, then the linear generator_taylor_coefficients, then jet. Verified on AMH (flat copula, θ=0.5): the log override reproduces the linear override's log-likelihood to machine precision across d=8..50, while plain jet drifts at d=30 and is wrong at d=50 — i.e. the log hook matches the paper's AMH precision result. Regression test in test_log_taylor_override.py.
- mkdocstrings: hide private/dunder members, Args/Returns as tables, symbol-type headings + TOC, no source dumps, drop merge_init (leaked CompiledModel private dataclass fields). API page renders in clean curated sections. - api.md: restructure into Defining a copula / Compiling & evaluating / Composition registry / Configuration / Advanced (generator-precision override hooks grouped + explained). - index.md + README.md: fix install — pip install (incl. git+) does not work (ignores the [tool.uv] oryx pin); document uv-from-source; PyPI gated on an upstream oryx release for jax 0.8.
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.
Follow-ups after #2 (two commits).
1. Log-space
generator_taylor_coefficientsoverrideAdds
Copula.log_generator_taylor_coefficients(t, k_max)returning(sign, log|c|)for the normalized Taylor coefficientsc_k = ψ^(k)(t)/k!. The Bell density already consumes coefficients as(sign, log|c|)internally, so a family whose series is computed in the log domain (e.g. AMH's Geometric-frailtylogsumexp) can feed them straight in instead of exponentiating to a possibly-overflowing float64 only forbellto take the log again.bell._root_assemblynow prefers this hook → lineargenerator_taylor_coefficients→ jet.Verified (AMH, flat copula, θ=0.5): the log override reproduces the linear override's log-likelihood to machine precision across d=8–50, while plain jet drifts at d=30 and is wrong at d=50 — i.e. it matches the paper's AMH precision result. Regression test in
tests/test_log_taylor_override.py(fast: 2 passed in ~2s).2. API-reference reorganization + install fix
merge_init(was leakingCompiledModel's private dataclass fields).api.md: restructured into Defining a copula / Compiling & evaluating / Composition registry / Configuration / Advanced (the generator-precision override hooks, grouped + explained —generator_taylor_coefficientsrecommended;log_generator_kth_derivativeflagged legacy single-layer).docs/index.md: corrected install —pip install(incl.git+…) does not work yet (ignores the[tool.uv]oryx pin); documents uv-from-source; PyPI gated on an upstream oryx release for jax 0.8.mkdocs build --strictclean;llms.txtgenerates.