This file contains 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
import jax | |
import jax.numpy as jnp | |
from jax.scipy.special import logsumexp | |
# Implements the Forward algorithm for an HMM as a scan (both generic and associative). | |
# Inputs: | |
# t[i,j] = transition probability from state i to state j | |
# e[i,o] = probability of emitting observation o from state i | |
# start[i] = initial probability of state i (transitions from start state) | |
# end[i] = probability of ending from state i (transitions to end state) |
This file contains 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
# emacs mode -*-makefile-*- | |
# Database downloaded from the FBTEE project, University of Western Sydney. | |
# FBTEE: The French Book Trade in Enlightenment Europe | |
# http://fbtee.uws.edu.au/ | |
# EULA for database available here: | |
# http://fbtee.uws.edu.au/main/eula/ |