# Confusion in parameter estimation of conditional random field

I have a certain confusion while taking the derivative of the log likelihood of the conditional random field. As given in this paper http://people.cs.umass.edu/~mccallum/papers/crf-tutorial.pdf

I mean while calculating the gradient with respect to a parameter $$\lambda_k$$

the derivate of the logZ term bring this term. $$p(y,y'|x^{(i)})$$

I am not sure how this term appeared while calculating the gradient. It is equation 1.22 of page 12 in the paper http://people.cs.umass.edu/~mccallum/papers/crf-tutorial.pdf

Can anyone please provide some insights?

-