ilmoi / MML-Book

Code / solutions for Mathematics for Machine Learning (MML Book)
957 stars 162 forks source link

Chapter 5, Ex. 9 #8

Open jens321 opened 3 years ago

jens321 commented 3 years ago

Hi,

For problem #9 in chapter 5, I think there is currently a missing partial with respect to v when computing dq/dv. Essentially, I believe this should be

dq/dv = aq/az az/av + aq/av dv/dv = aq/az * az/av + aq/av

the solution currently does not include this last term aq/av. (Note that "a" was used throughout to denote partial derivative.)

NebiyouTen commented 3 years ago

I think you are comparing two different approaches. I believe you are expecting, ag/az to be equal to p'(x, t(e,v)) / p(x, t(e,v)) - q'(t(e,v),v) / q(t(e,v), v) (which is the t'(e,v) term factored out from the equation in the solution manual). but note these are derivatives wrt v not z, which is different from partial derviatve wrt z where t is a constant. Hence, you will have an intermidate aq/az and ap/az terms.

AlbertoGuastalla commented 3 years ago

Yes, I also think that the author has forgotten the aq/av term... Since the function q depends on two variables (z, v) and not only on z.