tpm_hsmm2 function

Build the transition probability matrix of an HSMM-approximating HMM