mml-book / mml-book.github.io

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

5.101 mistake, trace and transpose are confused #733

Closed konradvoelkel closed 1 year ago

konradvoelkel commented 1 year ago

Describe the mistake In the formula, as stated, there is a trace (tr), where a transpose (T) should be instead

Location

  1. version Draft (2022-01-11) of “Mathematics for Machine Learning”. Feedback: https://mml-book.com.
  2. Chapter 5
  3. page 158
  4. equation number 5.101

Proposed solution Remove tr( ... ) and replace with ( ... )^T

Additional context Another issue was opened without proposed solution, but it seems it was closed by accident: issue #701

mpd37 commented 1 year ago

I think the equation is correct. Note that the trace operator is not the one we know from matrices, but it's defined on higher-dimensional tensors (see remark below). Please also check here (eq. (46)): https://www.math.uwaterloo.ca/~hwolkowi/matrixcookbook.pdf