2018年12月24日
摘要: 多元线性回归模型 from sklearn.datasets import load_boston from sklearn.model_selection import train_test_split # 波士顿房价数据集 data = load_boston() # 划分数据集 x_train, x_test, y_train, y_test = train_test_split(da... 阅读全文
posted @ 2018-12-24 09:00 吕达 阅读(169) 评论(0) 推荐(0) 编辑
  2018年12月20日
摘要: 1. 导入boston房价数据集。 1 2 3 4 from sklearn.datasets import load_boston boston = load_boston() boston.keys() print(boston.data) 2. 一元线性回归模型,建立一个变量与房价之间的预测模型,并图形化显示。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1... 阅读全文
posted @ 2018-12-20 15:35 吕达 阅读(364) 评论(0) 推荐(0) 编辑
  2018年10月25日
摘要: n=10 def pySum(n): a = list(range(n)) b = list(range(0, 5 * n, 5)) c = [] for i in range(len(a)): c.append(a[i] ** 2 + b[i] ** 3) return (c) print(pySum(n)) import nump... 阅读全文
posted @ 2018-10-25 21:59 吕达 阅读(99) 评论(0) 推荐(0) 编辑
摘要: from datetime import datetime print(datetime.now()) now=datetime.now() date= datetime.strftime(now,"%Y-%m-%d %H:%M:%S") date1 = '{0:%Y}年{0:%m}月{0:%d}日 阅读全文
posted @ 2018-10-25 21:53 吕达 阅读(69) 评论(0) 推荐(0) 编辑
  2018年10月11日
摘要: bodymusic = '''When the beat going like that boom boom Girl I wanna put you up in my room I wanna put you up against that wall Throw you on the bed and take your clothes off clothes off Everybody... 阅读全文
posted @ 2018-10-11 17:47 吕达 阅读(173) 评论(0) 推荐(0) 编辑
  2018年9月11日
摘要: s ='201606050008' a=s[:4] b=s[4:6] c=s[6:8] d=s[8:] print('年级{}'.format(a)) print('学院{}'.format(b)) print('班级{}'.format(c)) print('学号{}'.format(d)) while True: a = int(input('摄氏度转换为华氏温度请按1\... 阅读全文
posted @ 2018-09-11 17:30 吕达 阅读(134) 评论(0) 推荐(0) 编辑
  2018年9月3日
摘要: a1=input('请输入姓名:') a2=input("请输入姓名:") print('{}看见{}脸上有蚊子一拳把他掀翻在地上'.format(a1,a2)) # 输入摄氏度 a = float(input('请输入摄氏度:')) # 将摄氏度转换成华氏度 b = a * 9 / 5 + 32 # 输出 print('°C {}=°F {}'.format(a, b)) # 输入... 阅读全文
posted @ 2018-09-03 21:21 吕达 阅读(75) 评论(0) 推荐(0) 编辑