The maximum-likelihood parameters can then be obtained by finding the θ maximizing: And the gradient is given by: where the first term is the conditional expected feature count and the second term is the expected feature count.
far, we have written the equations in a generic form for arbitrary conditional random fields with latent variables (Sutton and McCallum, 2007).