机器学习复习
Java「在学」
这个作者很懒,什么都没留下…
展开
-
关于pandas中read_csv()的参数问题:加表头与不加表头的区别
不加表头from pandas import read_csv# filename = 'Pima_Indians.csv'# names = ['preg','plas','pres','skin','test','mass','pedi','age','class']data = read_csv('Pima_Indians.csv',header=None)peek = data...原创 2019-08-01 19:42:59 · 10288 阅读 · 0 评论 -
查看数据集的频率分布
以“age”列为依据查看这一列元素的出现次数,通过print()将各个元素的分布情况打印出来print(data.groupby(“age”).size())from pandas import read_csvfilename = 'Pima_Indians.csv'names = ['preg','plas','pres','skin','test' ,'mass','ped...原创 2019-08-01 20:33:01 · 738 阅读 · 0 评论 -
数据表头的相关度:通过皮尔逊相关系数法求解
from pandas import read_csvfrom pandas import set_optionfilename = 'Pima_Indians.csv'names = ['preg','plas','pres','skin','test','mass','pedi','age','class']data = read_csv(filename,names=names)...原创 2019-08-01 20:41:55 · 170 阅读 · 0 评论 -
数据的偏差情况:通过高斯分布查看(正态分布)
from pandas import read_csvfrom pandas import set_optionfilename = 'Pima_Indians.csv'names = ['preg','plas','pres','skin','test','mass','pedi','age','class']data = read_csv(filename,names=names)...原创 2019-08-01 20:50:09 · 806 阅读 · 0 评论