
《机器学习实战》笔记Python3.6
cckchina
从另一个角度回归电学!
展开
-
《机器学习实战》中贝叶斯分类导入RSS源中entries为[]
《机器学习实战》中贝叶斯分类中导入RSS源例子_python_动态网站制作指南 http://www.knowsky.com/885215.html参考原文: http://newyork.craigslist.org/stp/index.rss 替换为:NASA Image of the Day:http://www.nasa.gov/rss/dyn/image_of_the_day...原创 2018-04-08 20:34:20 · 2532 阅读 · 2 评论 -
What’s New In Python 3.0
1.The print statement has been replaced with a print() function, with keyword arguments to replace most of the special syntax of the old printstatement (PEP 3105).2.dictFixes dictionary iteration meth...原创 2018-03-24 08:50:20 · 234 阅读 · 0 评论 -
《机器学习实战》笔记:程序清单5-2 AttributeError: Unknown property maker
>>> imp.reload(logRegres)<module 'logRegres' from 'E:/AI/FirstPythonProj\\logRegres.py'>>>> logRegres.plotBestFit(wei)Traceback (most recent call last): File "<pyshell#30&g...原创 2018-04-11 21:25:46 · 3674 阅读 · 0 评论 -
《机器学习实战》笔记:RuntimeWarning: overflow encountered in exp
>>> logRegres.multiTest()Warning (from warnings module): File "E:/AI/FirstPythonProj\logRegres.py", line 13 return 1.0/(1+exp(-inX))RuntimeWarning: overflow encountered in expthe error ra...原创 2018-04-12 16:15:13 · 22762 阅读 · 10 评论 -
《机器学习实战》笔记:UnicodeDecodeError: 'gbk' codec can't decode byte 0xae in position 199: illegal multibyte
>>> bayes.spamTest()Traceback (most recent call last): File "<pyshell#19>", line 1, in <module> bayes.spamTest() File "E:\AI\FirstPythonProj\bayes.py", line 96, in spamTest ...原创 2018-04-06 23:04:26 · 5309 阅读 · 2 评论 -
《机器学习实战》笔记:IndexError: list index out of range
>>> myTree =trees.createTree(myDat,label)Traceback (most recent call last): File "<pyshell#6>", line 1, in <module> myTree =trees.createTree(myDat,label) File "E:\AI\FirstPyt...原创 2018-04-01 11:31:25 · 2383 阅读 · 7 评论 -
《机器学习实战》笔记:TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'
def chooseBestFeatureToSplit(dataSet): numFeatures = len(dataSet[0]) - 1 baseEntropy = calcShannonEnt(dataSet) bestInfoGain = 0.0; bestFeature = -1 for i in range(numFeatures): ...原创 2018-03-31 18:41:08 · 45520 阅读 · 5 评论 -
《机器学习实战》笔记:第8章,ValueError: x and y must be the same size
>>> yMat = xMat*ws>>> import matplotlib.pyplot as plt>>> fig =plt.figure()>>> ax =fig.add_subplot(111)>>> ax.scatter(xMat[:,1].flatten().A[0],yMat.T[:,原创 2018-04-24 13:01:32 · 28551 阅读 · 3 评论 -
《机器学习实战》笔记-第8章:矩阵中.T及.I的区别
参照程序清单8-2操作时,错误的把“.I”写成了“.T”,导致最终结果完全不对。#程序清单8-2 局部加权线性回归函数 20180424def lwlr(testPoint,xArr,yArr,k=1.0): xMat = mat(xArr);yMat = mat(yArr).T m =shape(xMat)[0] weights = mat(eye((m))) #创建对...原创 2018-04-24 16:39:09 · 2360 阅读 · 0 评论