jesolem / PCV

Open source Python module for computer vision
BSD 2-Clause "Simplified" License
1.92k stars 674 forks source link

knn classify method in ch08 isn't quite right #19

Open nico opened 10 years ago

nico commented 10 years ago

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.

santjaqo commented 8 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?