上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 36 下一页
摘要: 1、加载训练数据集,用于训练分类器#加载数据集,用于训练分类器def loadDataSet(): # 分词后的数据,一共有六个向量 postingList=[['my', 'dog', 'has', 'flea', 'problems', 'help',... 阅读全文
posted @ 2017-12-12 18:14 crr121 阅读(123) 评论(0) 推荐(0) 编辑
摘要: str = "thon.exe H:/python_workspace/test/test.py"import re#\\w* : \ + \w + *# ... 阅读全文
posted @ 2017-12-12 16:01 crr121 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1、决策树的工作原理(1)找到划分数据的特征,作为决策点(2)利用找到的特征对数据进行划分成n个数据子集。(3)如果同一个子集中的数据属于同一类型就不再划分,如果不属于同一类型,继续利用特征进行划分。(4)指导每一个子集的数据属于同一类型停止划分。2、决策树的优点:计... 阅读全文
posted @ 2017-12-07 21:09 crr121 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1、决策树的工作原理(1)找到划分数据的特征,作为决策点(2)利用找到的特征对数据进行划分成n个数据子集。(3)如果同一个子集中的数据属于同一类型就不再划分,如果不属于同一类型,继续利用特征进行划分。(4)指导每一个子集的数据属于同一类型停止划分。2、决策树的优点:计... 阅读全文
posted @ 2017-12-07 21:09 crr121 阅读(220) 评论(0) 推荐(0) 编辑
摘要: B=min(A):获得矩阵A每一列的最小值,返回值B为一个行向量,其第i列对应A矩阵第i列的最小值。 C=max(A) :获得矩阵A每一列的最大值,返回值C为一个行向量,其第i列对应A矩阵第i列的最大值。import numpy as npa = np.ar... 阅读全文
posted @ 2017-12-07 10:24 crr121 阅读(410) 评论(0) 推荐(0) 编辑
摘要: B=min(A):获得矩阵A每一列的最小值,返回值B为一个行向量,其第i列对应A矩阵第i列的最小值。 C=max(A) :获得矩阵A每一列的最大值,返回值C为一个行向量,其第i列对应A矩阵第i列的最大值。import numpy as npa = np.ar... 阅读全文
posted @ 2017-12-07 10:24 crr121 阅读(152) 评论(0) 推荐(0) 编辑
摘要: import matplotlib.pyplot as plt from numpy import * fig = plt.figure() ax = fig.add_subplot(223) ax.plot(x,y) plt.show() 参数223的意思... 阅读全文
posted @ 2017-12-05 15:01 crr121 阅读(95) 评论(0) 推荐(0) 编辑
摘要: import matplotlib.pyplot as plt from numpy import * fig = plt.figure() ax = fig.add_subplot(223) ax.plot(x,y) plt.show() 参数223的意思... 阅读全文
posted @ 2017-12-05 15:01 crr121 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1、创建随机矩阵>>> from numpy import *>>> random.rand(4,4)array([[ 0.1801566 , 0.02580119, 0.02685281, 0.52768083], [ 0.4541100... 阅读全文
posted @ 2017-12-05 09:26 crr121 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 1、创建随机矩阵>>> from numpy import *>>> random.rand(4,4)array([[ 0.1801566 , 0.02580119, 0.02685281, 0.52768083], [ 0.4541100... 阅读全文
posted @ 2017-12-05 09:26 crr121 阅读(104) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 36 下一页