吴裕雄 python 机器学习-NBYS(2)
摘要:import matplotlib import numpy as np import matplotlib.pyplot as plt n = 1000 xcord0 = [] ycord0 = [] xcord1 = [] ycord1 = [] markers =[] colors =[] for i in range(n): [r0,r1] = np.random.stan...
阅读全文
吴裕雄 python 机器学习-NBYS(1)
摘要:import numpy as np def loadDataSet(): postingList=[['my', 'dog', 'has', 'flea', 'problems', 'help', 'please'], ['maybe', 'not', 'take', 'him', 'to', 'dog', 'park', 'stupid'], ...
阅读全文
吴裕雄 python 爬虫(4)
摘要:............................................ 50 .................................................................. ...................................
阅读全文
吴裕雄 python 爬虫(3)
摘要:........................................................
阅读全文
吴裕雄 python 爬虫(2)
摘要:import requests from bs4 import BeautifulSoup url = 'http://www.baidu.com' html = requests.get(url) sp = BeautifulSoup(html.text, 'html.parser') print(sp) html_doc = """ 页标题 文件标题 Once upon a t...
阅读全文
吴裕雄 python 爬虫(1)
摘要:from urllib.parse import urlparse url = 'http://www.pm25x.com/city/beijing.htm' o = urlparse(url) print(o) print("scheme={}".format(o.scheme)) # http print("netloc={}".format(o.netloc)) # www.pm25...
阅读全文
吴裕雄 python 机器学习-DMT(2)
摘要:import matplotlib.pyplot as plt decisionNode = dict(boxstyle="sawtooth", fc="0.8") leafNode = dict(boxstyle="round4", fc="0.8") arrow_args = dict(arrowstyle=" maxDepth: maxDepth = thisDepth retu...
阅读全文
吴裕雄 python 机器学习-KNN(2)
摘要:...................................................
阅读全文
吴裕雄 python 机器学习-KNN算法(1)
摘要:................................................ .......................................
阅读全文