- 博客(5)
- 收藏
- 关注
原创 机器学习实战:决策树_ID3算法
都在代码里了 trees.py from math import log def calcShannonEnt(dataSet): numEntries = len(dataSet) labelCounts = {} for featVec in dataSet: currentLabel = featVec[-1] if currentLabel not in labelCoun...
2019-07-28 17:44:42
214
原创 机器学习实战
**key1:**shape函数是numpy.core.fromnumeric中的函数,它的功能是查看矩阵或者数组的维数。 >>> c = array([[1,1],[1,2],[1,3],[1,4]]) >>> c.shape (4, 2) >>> c.shape[0] 4 >>> c.shape[1] 2 ...
2019-07-21 21:31:00
237
原创 《机器学习实战:基于Scikit-Learn和TensorFlow 》笔记
import os import tarfile from six.moves import urllib import pandas as pd #下载地址 DOWNLOAD_ROOT = "https://raw.githubusercontent.com/ageron/handson-ml/master/" #本地存储地址(本文件夹下) HOUSING_PATH = "datasets/h...
2019-07-14 16:03:16
342
原创 python爬虫的几个常用库
urllib的request模块 #urllib的请求模块 import urllib.request #用请求模块打开百度网站,并返回给response response = urllib.request.urlopen('http://www.baidu.com') #读取response,并以utf-8的编码形式 print(response.read().decode('ut...
2019-07-10 17:36:36
800
2
原创 MongoDB --dbpath时Invalid command: Files\MongoDB\Server\3.4\data\db
斜体样式原因是Dos下路径中的文件名不能有空格,如果文件名有空格,比如Program Files,则需要给路径加双引号: 错误示范:mongod --dbpath D:\Program Files\MongoDB\Server\3.4\data\db 正确示范:mongod --dbpath “D:\Program Files\MongoDB\Server\3.4\data\db” ...
2019-07-09 15:24:02
1221
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人