Skip to main content
. Author manuscript; available in PMC: 2017 Jan 13.
Published in final edited form as: JMLR Workshop Conf Proc. 2016 Jun 11;48:334–343.

Algorithm 1.

Dynamic program for inference in the HNS model.

α(1)(j,k)={ψj(1)(1)ifj=kα(1)(j,k1)ψk(1)(0)k>j}
α(2)(j,c)={1ifj=n+1maxjknmaxc{1,,C}α(1)(j,k)ψjk(2)(0)eωcα(2)(k+1,c)ifc=0maxjknα(1)(j,k)ψjk(2)(1)α(2)(k+1,c1)ifc>0}