Repository navigation
Add asymmetric_translog: translog with sign-split own squares around an estimated knot - #102
Open
hmgaudecker wants to merge 7 commits into
Open
hmgaudecker wants to merge 7 commits into
hmgaudecker wants to merge 7 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## stable-translog #102 +/- ##
===================================================
+ Coverage 95.42% 95.51% +0.08%
===================================================
Files 148 151 +3
Lines 15178 15459 +281
===================================================
+ Hits 14484 14765 +281
Misses 694 694 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…runners The three estimation tests in tests/test_chs_estimate.py take about four minutes each and dominated the twenty-minute suite. Each now runs in its own ubuntu job; the rest shard on every OS deselects them. Coverage uploads from the four Linux jobs are merged by codecov. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017psXwkMuDeVmTu5WgoM26k
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017psXwkMuDeVmTu5WgoM26k
f = c + Σβx + Σγ⁺max(x−κ,0)² + Σγ⁻min(x−κ,0)² + Σδ x_a x_b, C¹ in x and κ. Nests translog (γ⁺ = γ⁻, κ = 0). Kernel tests per spec section 5 items 1-7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017psXwkMuDeVmTu5WgoM26k
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017psXwkMuDeVmTu5WgoM26k
Same-law registered reference reproduces contributions and gradient; equal curvature with zero knots reproduces translog; endogenous carry-forward substeps accept the function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017psXwkMuDeVmTu5WgoM26k
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017psXwkMuDeVmTu5WgoM26k
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y3CuwvNUhYTSpriKYSwqmq
hmgaudecker
force-pushed
the
asymmetric-translog
branch
from
October 18, 2026 06:21
1be29c7 to
831db22
Compare
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
hmgaudecker
changed the base branch from
stable-translog
to
missing-observed-factors
October 18, 2026 06:21
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.
Stacked on #103 (
missing-observed-factors). Replaces #101:stable_translogis dropped; this PR also carries #101's CI-sharding commit.Implements
docs/superpowers/specs/2026-10-16-asymmetric-translog-design.md.What
New built-in transition function
f(x) = c + Σ β_j x_j + Σ γ⁺_j max(x_j − κ_j, 0)² + Σ γ⁻_j min(x_j − κ_j, 0)² + Σ_{a<b} δ_ab x_a x_b
where, no clipping).translog: γ⁺ = γ⁻ gives a translog with shifted linear/constant terms; with κ = 0 it is exactlytranslog.f ** 2 (above),f ** 2 (below),f knot, interactions,constant. Identity constraints: own linear 1, everything else (knots included) 0.Motivation (spec §1): in the health-cognition application the measures revert strongly at one end of the range and are near-linear at the other. A single square coefficient then forces an own slope above one at the near-linear end; a symmetric clip of the states cannot separate the two ends either.
Registration
_AF_COMPATIBLE_TRANSITIONS,_LEAKY_BUILTIN_PRODUCTION(AF),builtin_names(AMN resolver), the reference-guide lists.Tests
tests/test_asymmetric_translog.py: translog nesting (κ = 0 and κ ≠ 0, 1e-12), one-sided derivatives, C¹ at the knot in x and κ, names/identity constraints, JIT/vmap/50-step scan vs eager, and a fixed-point witness for the application pattern.tests/test_asymmetric_translog_dispatch.py: public model, AMN resolver, AF allow-lists/validation, with a value that distinguishes the two sides of the knot.tests/test_asymmetric_translog_estimation.py: a registered same-law reference reproduces CHSloglikeobs(1e-10) and the gradient (rtol 1e-8); equal curvature with zero knots reproducestranslog; unequal curvature and swapped sides change the result; endogenous carry-forward substeps accept the function.Full suite (
pytest tests -m 'not long_running' -n 2on 831db22): 857 passed.https://claude.ai/code/session_017psXwkMuDeVmTu5WgoM26k