机器学习实战
MengWoods
记录一些机器人相关的技术、数学、编程和人工智能相关数学、算法、工具、心得等。
展开
-
【其他】《机器学习实战》2.2.2 节绘图时出现 NameError:name‘array’is not defined
书中shell如下: 实际运行时 报错 NameError:name‘array’is not defined 修改shell程序如下即可运行:>>> import kNN >>> from numpy import * >>> import matplotlib >>> import matplotlib.pyplot as plt>>> fig = plt.figure()原创 2017-03-17 09:38:39 · 7555 阅读 · 5 评论 -
【其他】《机器学习实战》 2.1 小节 kNN 算法中 invalid literal for int() with base 10:‘largeDoses
机器学习实战 一书 2.1 小节 kNN 算法中,出现一列如下形式def file2matrix(filename): fr = open(filename) numberOfLines = len(fr.readlines()) #get the number of lines in the file returnMat = zeros((numberOfL原创 2017-03-17 00:11:12 · 2940 阅读 · 1 评论