mml-book / mml-book.github.io

Companion webpage to the book "Mathematics For Machine Learning"
12.71k stars 2.36k forks source link

mistake in formula 5.99 #754

Closed lyuzhathkk closed 9 months ago

lyuzhathkk commented 1 year ago

Describe the mistake A clear and concise description of what the mistake is. 5.99 need prerequisite

Location Please provide the

  1. version: Draft (2023-02-15) of “Mathematics for Machine Learning”.
  2. Chapter: 5
  3. page: 158
  4. 5.99 5.104 5.105

Proposed solution 5.99 should add a prerequisite for only applying to the function of matrix(m,n,p,q) in multiple dimensions.

Additional context It contradicts when using 5.99 and 5.104 to derive 5.105 d xt a/ dx = at d at x/ dx = d (xt a)t/ dx =(5.99)= (d (xt a)/ dx)t = (at)t = a != at And I realize this 5.99 only applies to f over 2 dimensions because if using numerator format, some dimensions are set by x itself, and does not influenced by the transpose of f.

mpd37 commented 9 months ago

In (5.104) we have $f(x) = x^t a$, which is scalar. Therefore, $f(x)^T = a^T x$, which is still scalar. (5.105) should follow from this (and the derivative is the same)?