Closed ychong closed 6 years ago
Hi Thanks for the question. I'm just starting on updating the book and code for a version 2. When I get to chapter 7, I'll add an explanation.
I'll add this to the notebook and next version of the book, but here is an explanation now:
The argsort() method sorts from least to greatest. Since we have a similarity matrix, we want to sort from greatest similarity to least similarity. If we take the negative of all the numbers before sorting, that will sort the indices of the numbers in the correct order. I hope that helps!
Thanks for the clarification and reply Nick.
Really appreciate it.
On Wed, Mar 21, 2018 at 10:17 PM, Nick notifications@github.com wrote:
Hi Thanks for the question. I'm just starting on updating the book and code for a version 2. When I get to chapter 7, I'll add an explanation.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nfmcclure/tensorflow_cookbook/issues/122#issuecomment-374952157, or mute the thread https://github.com/notifications/unsubscribe-auth/ACHU98l1VrWkuyzTyT5Xhln8TuIIU77Iks5tgmDlgaJpZM4SAyHp .
Apologies for the simple question:
For Line 272, why do we multiply sim matrix by negative?
Why -sim[j, :]?