几个关注点:
np.tile 把inX 扩展到与dataSet 同尺寸, 比较浪费内存
argsort 按值升序排列,但是返回 value 的index
classCount.get(voteIlabel, 0) 如果无voteIlabel的索引,则返回0。有些多余,如果voteIlabel不在索引范围内,则会直接报错。
key=operator.itemgetter(1) 按照值排序,似乎classCount.items() 会对待每个items为tuple
http://stackoverflow.com/questions/613183/sort-a-python-dictionary-by-value