Skip to content

Correctness fixes: bits everywhere, exact Fischer/Krieger covers, and other bugs (1/5) - #17

Closed
Autoplectic wants to merge 3 commits into
mainfrom
sofic-correctness-fixes
Closed

Autoplectic wants to merge 3 commits into
mainfrom
sofic-correctness-fixes

Conversation

@Autoplectic

Copy link
Copy Markdown
Member

First of five stacked PRs from a full package review (see CHANGELOG.md in PR 5 for the migration table).

  • All information quantities in bits, including log-likelihoods; AIC/BIC/WAIC keep the standard deviance scale.
  • TMC multiplicity counted in entropy and the Parry measure; SFT construction raises instead of truncating.
  • Exact Fischer covers (Lind-Marcus convention: right = right-resolving) and new exact Krieger covers.
  • Markov empty words / sample_path, zero-mass sampling, exact crypticity, narrowed broad excepts, equivalent() alphabet.
  • SlidingBlockCode.apply keeps long constraints; Baum-Welch zero-probability handling; Buchi empty loops.

Tests, ruff, and sphinx -W pass.

Made with Cursor

Ryan James and others added 2 commits October 6, 2026 14:26
…act Fischer/Krieger covers

- Report topological entropy, collision entropy, and HMM log-likelihoods in bits;
  model-selection criteria convert to natural logs to keep their standard scale.
- Count ATTR_MULTIPLICITY in TMC adjacency matrices (entropy and Parry measure).
- Raise instead of silently truncating SFT presentations at max_states.
- Markov words of length 0 and sample_path respect the initial distribution.
- Raise a clear error when sampling from an initial law with no mass.
- Exact crypticity C_mu - E in block_entropy_estimates(use_exact=True).
- Narrow broad except-Exception fallbacks that silently changed results.
- equivalent() compares over the union of both automata's alphabets.
- Exact right/left Fischer covers (Lind-Marcus convention: right = right-resolving)
  and new exact right/left Krieger covers.

Co-authored-by: Cursor <cursoragent@cursor.com>
…bility data, Buchi empty loops

- SlidingBlockCode.apply tracks the source presentation so constraints longer
  than the window survive, and rejects block maps that miss an allowed block.
- Baum-Welch raises when every sequence is impossible and warns when some are.
- Buchi lasso acceptance rejects an empty loop (not an omega-word).
- suggest_lmax encodes symbols injectively instead of via repr.
- Tests: Viterbi on impossible data, YAML round trips for every cover class and
  SymbolicModel. ALERGIA's Hoeffding test, SlidingBlockCode.compose, and
  TextileSystem.induced_code were checked and are correct as written.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Autoplectic

Copy link
Copy Markdown
Member Author

Superseded by #22, which contains the same commits as a single PR.

@Autoplectic Autoplectic closed this Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant