Closed fbcotter closed 6 years ago
HI @fbcotter , Thanks for this! I'm just getting around to triaging issues in preparation for a v2-update of the code.
I suspect you are correct. When I get around to chapter 4, I'll investigate and most likely accept your proposal. Expect more in the next month or so. Thanks again!
Yes, thanks. I just looked into that and found you are correct. I've implemented a very similar fix and kept the 'dist' variable terminology in both the *.py and the jupyter notebook. Thanks again!
I think there's a bug in the calculation of the Gaussian Kernel for the multiclass SVM. Your code is as follows:
Initially it bothered me that the variable
dist
was calculated but never used. I then tried to figure out what you were doing in this code, and I think it is supposed to be doing something like this (dist is K in the below example)In which case, the code should read something more like:
(The sq_dists calculation uses broadcasting so we don't need to create the
J
matrix as in the math above)