![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据分析
Muwenlong#
这个作者很懒,什么都没留下…
展开
-
机器学习sklearn模块
基础不牢地动山摇,根据下面代码可以简单了解数据挖掘的基本流程,但是目前自己并不可以灵活运用,在自己重新温习数据结构,概率论知识之后,再深入了解机器学习。。。。。转帖:机器学习关于数据挖掘方向的简单架构# Loadlibrariesimport pandas as pdfrom pandas.plotting import scatter_matriximport matplotlib.pyplot as pltfrom sklearn import model_selectionfrom sk原创 2020-06-18 14:46:18 · 339 阅读 · 0 评论 -
python爬虫及数据分析实例回顾1
python爬虫应用是自己最早涉及的模块,但那时还没接触到博文,现在进行简单回顾。本案例是在微博上获取有关国庆六十周年的相关信息。首先要获取有关国庆的相关搜索关键词,当时有一个“新时代专栏”,代码如下:#encoding:utf-8--from lxml import etreeimport timeimport requestsclass WEIBO(): cookie={ 'Cookie': '_T_WM=52165934645; ALF=1573204852;原创 2020-05-16 16:11:12 · 869 阅读 · 0 评论 -
numpy的基本操作
numpy官方文档https://www.numpy.org.cn/ #求标准差 std=np.std(self.data['wage']) print("标准差为"+str(std)) #求方差 variance=np.var(self.data['wage']) print("方差为"+str(varianc...原创 2020-03-26 08:54:56 · 94 阅读 · 0 评论 -
Matplotlib及seaborn基本操作
plt.figure(figsize=(7,5),edgecolor='pink',facecolor='white',frameon=False)#绘图参数 plt.scatter(x, y)#散点图 plt.plot(x, model.predict(x), color='r')#直线图&曲线图 plt.xlabel('IQ')#横轴 plt.ylab...原创 2020-03-25 12:11:46 · 264 阅读 · 0 评论 -
Sklearn模块
官方文档https://scikit-learn.org/dev/getting_started.html线性回归部分from sklearn.linear_model import LinearRegression初始化model=LinearRegression()构建模型model.fit(x,y)#x,y要求是二维数组,可以使用pandas的DataFrame数据类型...原创 2020-03-25 11:14:46 · 127 阅读 · 0 评论