tpm_hsmm function

Builds the transition probability matrix of an HSMM-approximating HMM