Add explicit-state distribution fitting path - #77
Open
jonathanberthias wants to merge 9 commits into
Open
jonathanberthias wants to merge 9 commits into
jonathanberthias wants to merge 9 commits into
Conversation
jonathanberthias
force-pushed
the
migration/distribution-core
branch
from
September 26, 2026 14:25
2ec729c to
fae4bc1
Compare
jonathanberthias
changed the base branch from
master
to
chore/pin-ruff-hook
September 26, 2026 14:26
jonathanberthias
force-pushed
the
migration/distribution-core
branch
from
September 26, 2026 19:15
fae4bc1 to
aa932f0
Compare
jonathanberthias
added this pull request to stack #84
September 26, 2026 19:15
jonathanberthias
force-pushed
the
migration/distribution-core
branch
from
September 26, 2026 19:28
aa932f0 to
31d4bb3
Compare
jonathanberthias
force-pushed
the
migration/distribution-core
branch
from
September 26, 2026 19:36
31d4bb3 to
b8f0e28
Compare
jonathanberthias
force-pushed
the
migration/distribution-core
branch
from
September 26, 2026 19:52
3cb8f98 to
167602f
Compare
jonathanberthias
marked this pull request as ready for review
September 27, 2026 11:39
for more information, see https://pre-commit.ci
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.
Current situation
The parameter graph and explicit
Statealready exist, but the public distribution path still fits by rebuilding distributions with fitted values.Nodealso defines arithmetic that always creates aFunctionExpr; a distribution needs to be a graph node, but cannot validly use those numeric-expression operators.Change
Add an opt-in continuous distribution node, state-aware likelihood evaluation, and
fit_mle. AFitResultretains the model and holds fitted values in a separate state. Literal constructor values become structural constants, while suppliedParameternodes keep their identity. Move arithmetic fromNodetoExpr, leaving the shared node base responsible for graph traversal.Notes
The existing public distribution API remains in place. Distribution arithmetic can later define operations with distribution-specific results; this PR gives no meaning to
Distribution + Distribution. The new path is a continuous starting point, not the eventual common contract for discrete or multivariate laws.