K-近邻算法(KNN)(二)示例:改进约会网站配对效果
转载请注明作者和出处:https://blog.csdn.net/weixin_45814668
微信公众号:qiongjian0427
知乎:https://www.zhihu.com/people/qiongjian0427
Github代码获取:https://github.com/qiongjian/Machine-learning/
Python版本: Python3.x
K-近邻算法(KNN)(一)理论
昨天运行代码时出现了问题,参考网上改正。
1.module ‘kNN’ has no attribute ‘classify0’
重启
2.‘dict’ object has no attribute ‘iteritems’
将iteritems变为items
3.name ‘true’ is not defined
单词大小写的问题,第一个字母t大写
运行结果如下