Open nico opened 10 years ago
I've just found the same issue. I am using the book draft available here: http://programmingcomputervision.com/downloads/ProgrammingComputerVision_CCdraft.pdf I have no access to O'Reilly's final edition, but apparently the issue is also in that version.
@nico wouldn't you like to pull request your fix?
It computes a label -> vote mapping and then ignores the votes and just returns the highest label. The change to knn.py in https://github.com/nico/cvbook/commit/bf567d293e3620538c5e0e3b2af580a2cc28db56 fixes this.