# Optimizing HMM log-likelihood with time-dependent prior

I have a HMM (Hidden Markov Model) which emits an observation Z.

The parameters of the HMM are $$\boldsymbol\theta$$. $$\boldsymbol\theta = {\boldsymbol{A},\boldsymbol{B},\pi}$$

Where $$\boldsymbol{A}$$ is the transition matrix, $$\boldsymbol{B}$$ is the emission matrix and $$\boldsymbol{\pi}$$ is the initial distribution matrix over the states.

I want to maximise $$= \sum_{Z} q(Z)log P(Z | \boldsymbol{\theta})$$

where $$q(Z)=p(Z|\boldsymbol\theta^{t-1})$$ is a probability of the particular Z being observed. Where the $$\boldsymbol\theta^{t-1}$$ is the HMM parameter of the previous step.

I know that I can maximise $$= \sum_{Z} log P(Z | \boldsymbol{\theta})$$ using Baum-Welch algorithm but is there a good way to maximise the expression above?

Kindly note that q(Z) remains fixed in this problem and we are maximising the function wrt $$\boldsymbol\theta$$

The parameter $$\theta$$ doesn't encode the current state of the HMM and so it isn't time dependent and talking about $$\theta$$ versus $$\theta^{t-1}$$ doesn't make sense.
We predict maximally likely distributions for $$X_t$$ and transitions between $$X_t$$ given the observed data and HMM Parameters and then use these distributions to in turn update our HMM Parameters.
In the Baum-Welch optimisation for HMMs, we distinguish between Observations $$Z$$, Time-Dependent States $$X_t$$ and HMM Parameters $$\theta$$.