Cyrus
- 3,237
- 17
I'm not sure how you apply the rules of a derivative on a quadratic form. I've been trying to find the solution on google but no luck:
Basicallly:
J=\frac{1}{2} (z-X \theta)^T (z-X \theta)
and
\frac{ \partial J}{\partial \theta}= -X^T z +X^TX\theta
I can't for the life of me figure out how they got from the upper equation to the lower equation. The reason is that the transpose is really screwing things up in terms of the deriatives. There is some rule being applied to matrix differentiation of a transpose of a quadratic form that I am ignorant of, which won't let me get to the same expression on the second line...
Every time I try to expand the top line out I end up with 2*cross product term that doesn't drop out, but is clearly not shown in the second line.
Basicallly:
J=\frac{1}{2} (z-X \theta)^T (z-X \theta)
and
\frac{ \partial J}{\partial \theta}= -X^T z +X^TX\theta
I can't for the life of me figure out how they got from the upper equation to the lower equation. The reason is that the transpose is really screwing things up in terms of the deriatives. There is some rule being applied to matrix differentiation of a transpose of a quadratic form that I am ignorant of, which won't let me get to the same expression on the second line...
Every time I try to expand the top line out I end up with 2*cross product term that doesn't drop out, but is clearly not shown in the second line.