03 2019 档案

摘要:def psb(): new = fetch_20newsgroups(subset='all') # 形成数据集 # print(new.target, new.DESCR) ''' X: 特征值 X_train : 特征值训练集 X_test : 目标值测试集 Y:目标值 Y_train : 目 阅读全文
posted @ 2019-03-18 22:58 晴晴小可爱的小弟 阅读(391) 评论(0) 推荐(0)
摘要:我们在机器学习中少不了对大数据的分析与处理,那么我们的数据怎么来呢?并且我们的数据是怎么训练呢? sklearn里面保存了许多的数据集 测试集与数据集的分割 from sklearn.datasets import load_iris from sklearn.model_selection imp 阅读全文
posted @ 2019-03-12 23:25 晴晴小可爱的小弟 阅读(488) 评论(0) 推荐(0)
摘要:1 def Var(): # 方差过滤式 2 3 ''' 4 过滤式 5 :return:None 6 ''' 7 8 var = VarianceThreshold(threshold=0) 9 x = var.fit_transform([[1, 2, 3, 6], 10 [1, 6, 6, 8 阅读全文
posted @ 2019-03-09 14:53 晴晴小可爱的小弟 阅读(329) 评论(0) 推荐(0)
摘要:机器学习的数据来源: 1.大多以文件的形式储存,csv 等。 2. 为什么不用数据库呢,因为会有瓶颈,可能30m 以上就不行了。 3. 数据格式不匹配, 数据库格式是json, 4. python有pandas库 运行速度快, 并且python的numpy库是 真正的多线程 数据集的组成: kagg 阅读全文
posted @ 2019-03-08 13:59 晴晴小可爱的小弟 阅读(197) 评论(0) 推荐(0)
摘要:# _*_coding:utf-8_*_# /usr/bin/env python3# Author:book Mikiimport matplotlib.pyplot as pltimport numpy as npx = np.linspace(-5, 20, 20)y1 = x**2y2 = x*2+2# plt.figure(num=1)# plt.plot(x, y1)plt.figur... 阅读全文
posted @ 2019-03-04 23:22 晴晴小可爱的小弟 阅读(424) 评论(0) 推荐(0)