2018年12月21日
摘要: 1. from sklearn.datasets import load_boston data = load_boston() from sklearn.model_selection import train_test_split x_train, x_test, y_train, y_test 阅读全文
posted @ 2018-12-21 19:29 詫秺 阅读(135) 评论(0) 推荐(0) 编辑
  2018年12月19日
摘要: from sklearn.datasets import load_boston boston = load_boston() print(boston.keys()) from sklearn.datasets import load_boston import matplotlib.pyplot 阅读全文
posted @ 2018-12-19 13:29 詫秺 阅读(103) 评论(0) 推荐(0) 编辑
  2018年12月6日
摘要: import csv file_path = r'EmailData.txt' EmailData = open(file_path,'r',encoding='utf-8') Email_data = [] Email_target = [] csv_reader = csv.reader(Ema 阅读全文
posted @ 2018-12-06 21:27 詫秺 阅读(106) 评论(0) 推荐(0) 编辑
  2018年11月22日
摘要: 1.理解分类与监督学习、聚类与无监督学习。 简述分类与聚类的联系与区别。 聚类:是指事先没有“标签”而通过某种成团分析找出事物之间存在聚集性原因的过程。 分类:是根据文本的特征或属性,划分到已有的类别中。也就是说,这些类别是已知的,通过对已知分类的数据进行训练和学习,找到这些不同类的特征,再对未分类 阅读全文
posted @ 2018-11-22 22:00 詫秺 阅读(130) 评论(0) 推荐(0) 编辑
  2018年11月15日
摘要: 1 from sklearn.datasets import load_sample_image from sklearn.cluster import KMeans import matplotlib.pyplot as plt china = load_sample_image("china.j 阅读全文
posted @ 2018-11-15 14:32 詫秺 阅读(112) 评论(0) 推荐(0) 编辑
  2018年10月15日
摘要: fo = open("1.txt", "r", encoding='utf-8')read = fo.read()fo.close()read = read.strip().lower()for i in '''.,?;:''': read = read.replace(i, ' ')readLis 阅读全文
posted @ 2018-10-15 11:45 詫秺 阅读(107) 评论(0) 推荐(0) 编辑
  2018年10月9日
摘要: a = list('nihao') # 列表的遍历 print(a) for i in a: print(i) b = tuple('12323') # 元组的遍历 print(b) for i in b: print(i) c = set('kjkjhg') # 集合的遍历 print(c) fo 阅读全文
posted @ 2018-10-09 02:53 詫秺 阅读(121) 评论(0) 推荐(0) 编辑
  2018年9月10日
摘要: 作业2 作业3 阅读全文
posted @ 2018-09-10 10:01 詫秺 阅读(184) 评论(0) 推荐(0) 编辑
  2018年9月3日
摘要: 作业2 阅读全文
posted @ 2018-09-03 11:07 詫秺 阅读(140) 评论(0) 推荐(0) 编辑