Loading tsb…

← tsb playground

Hidden Markov Models

Fit hidden regimes with Baum-Welch estimation and decode state sequences with Viterbi. Every example runs the tsb library and can be edited independently.

1 · Gaussian regimes

Recover two regimes from a numeric sequence.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

2 · Discrete symbols

Estimate a model for integer observations and inspect symbol probabilities.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

3 · Decode known parameters

Find the most likely state sequence without estimating parameters.

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent