Composable Model Graph
← Curriculum map Lesson 06 / 08

Trellis estimation / lesson 06

Decode a coherent path through noise

The best state at every step is not always the best path through all steps.

01 / Problem + boundary

Know what the primitive owns.

Problem

Pointwise selection follows every local spike. Sequential estimation trades observation fit against the cost of implausible transitions.

System boundary

The estimation package maximizes scores minus transition costs. It does not require or claim probabilities.

02 / Executable shape

State changes become visible.

Inspectable: Per-step state score, transition cost, cumulative score, selected state, and full or fixed-lag path.

03 / Deterministic lab

Change transition weight and watch the middle noise spike survive or disappear.

Static specimen / JavaScript adds controls without changing the lesson.

04 / Specimens

Same idea, honest surfaces.

const decoded = decodePath(trellis, {
  transitionCost: (prev, next) =>
    Math.abs(prev.value - next.value),
  transitionWeight: 1,
});

console.log(decoded.stateIds); // ["0", "0", "0"]
05 / Interpretation boundary

What this does not imply.

Scores may be log-likelihoods, but probabilities are optional. The primitive is a linear-chain energy maximizer.

06 / Understanding check

What happens when transitionWeight is zero?