Free the constants a retirement leaves with no consumer
A retirement removed the retired quantities and every node computed from them, but never a constant, or a value folded from constants, since those are computed from no quantity: the scales, the anchors, and each replacement's matrix and right-hand side stayed in the model after the factor that used them was gone, and the sliding_window example's model grew from 854 nodes after tick 9 to 4,121 after tick 79. This entry has a retirement also free every node it leaves needed by nothing, one that is no quantity, has no consumer, and is held by no term, binding, sampler, proposal or pin, by reference counting from what the change touched. The mathematics shows that this removes nothing a term, sampler or proposal reads and changes no value of the model, and that a model's size is then bounded by what its current quantities, terms and pins need. It decided that a handle the user holds does not keep its node, and added scope::pin and scope::unpin for the nodes that must be kept, such as a constant made once for a whole run. The sliding window now holds at most 680 nodes, and checks that the count stopped growing.
A retirement removed the retired quantities and every node computed from them, but never a
constant, or a value folded from constants, since those are computed from no quantity: the scales,
the anchors, and each replacement’s matrix and right-hand side stayed in the model after the factor
that used them was gone, and the sliding_window example’s model grew from 854 nodes after tick 9
to 4,121 after tick 79. This entry has a retirement also free every node it leaves needed by
nothing, one that is no quantity, has no consumer, and is held by no term, binding, sampler,
proposal or pin, by reference counting from what the change touched. The mathematics shows that this removes nothing a term, sampler or proposal reads and changes no value of the
model, and that a model’s size is then bounded by what its current quantities, terms and pins need.
It decided that a handle the user holds does not keep its node, and added scope::pin and scope::unpin for the nodes that must be kept, such as a constant made once for a whole run. The
sliding window now holds at most 680 nodes, and checks that the count stopped growing.
Where it stands
- Mathematics
- Implementation
- Plan
- Build
- Publish
Documents
What it changed
The pages that say what this entry made true:
- Building a model A model is built inside a scope a writer opens, by ordinary functions of handles, and published as an immutable snapshot that may be read from any thread or forked into a branch.
- Linearization and elimination A density query is linearized at a batch of points into factored least-squares problems over its free quantities, by its residuals or by its information roots, and each problem is eliminated in square-root form on the host into a step, marginals, an evidence, draws, or a retirement's replacement; the Levenberg–Marquardt method iterates the steps to the mode.
- Spaces and quantities Every value in a model lives in a space, which fixes how it is stored, how it moves, and the typed handle code holds it by.
- Terms and the probabilistic graph A model's density is a sum of terms, each a log-density that scores one quantity or none; the terms and quantities together make the probabilistic graph inference reads, and a retirement removes some quantities, replaces their terms, and frees what it leaves needed by nothing.
- The normal distribution skoro's normal is the law of a point moved by normal noise through its space's chart, on every space whose chart is global, with an exact density and sampler, a scale in four forms, roles that estimators read, its tangent among them, and the Gaussian and improper Gaussian replacements of a retirement.
- A sliding window The example sliding_window, read top-down: a model kept to its last few poses as a robot drives an open path, each tick appended, solved and the oldest retired with a linearized replacement, and its estimates set beside the truth and the batch.
- Crates The workspace's crates, what each holds, and what each depends on.
- What is skoro? A library for writing a probabilistic model once and running any inference algorithm on it, built for models that live over time.
The crates it changed:
What it revises
- The core Done The core of skoro, built to the charter: three crates in which a model can be built, queried and differentiated, but no distribution exists yet. skoro-tensor is the layer over burn, whose tensors are…
History
- Started at math
- Approved math
8601ef8 - Reopened math
57a91ecThe nodes a model holds outside the compilation graph's edges omitted each sampler's inputs and log-density, so a retirement could free a node a surviving term's sampler reads. - Approved math
50c685b - Approved implementation
082a3da - Approved plan
894152a - Approved build
efea3b2 - Approved publish
91c9b94