摘要: 执行 opt.maximize()示意截图 执行opt.max 示意截图 阅读全文
posted @ 2019-10-31 11:11 洋洋同学 阅读(424) 评论(0) 推荐(0) 编辑
摘要: ```python def calc_score_median(sample_set, var): ''' 计算相邻评分的中位数,以便进行决策树二元切分 param sample_set: 待切分样本 param var: 分割变量名称 ''' var_list = list(np.unique(sample_set[var])) var_... 阅读全文
posted @ 2019-07-19 18:08 洋洋同学 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 1.将notebook文件上传至github 2.在github中打开文件. 复制地址. 打开 "jupyter nbviever网址" , 产生新的网址 3.在markdown模式下用下列代码嵌入jupyter notebook: 阅读全文
posted @ 2019-06-27 14:40 洋洋同学 阅读(1303) 评论(0) 推荐(0) 编辑
摘要: collections模块 在内置数据类型(dict、list、set、tuple)的基础上,collections模块还提供了几个额外的数据类型:Counter、deque、defaultdict、namedtuple和OrderedDict等。 1.namedtuple: 生成可以使用名字来访问 阅读全文
posted @ 2019-06-26 16:30 洋洋同学 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 给函数增加一个计时功能 给装饰器传参数 阅读全文
posted @ 2019-06-26 14:15 洋洋同学 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 转载链接:https://blog.csdn.net/weekdawn/article/details/81389865 阅读全文
posted @ 2019-06-25 11:21 洋洋同学 阅读(1214) 评论(0) 推荐(0) 编辑
摘要: 参考链接:https://gist.github.com/jayspeidell/d10b84b8d3da52df723beacc5b15cb27 阅读全文
posted @ 2019-06-21 14:00 洋洋同学 阅读(1816) 评论(0) 推荐(0) 编辑
摘要: ```python #导入相应的包 import pymongo import pandas as pd from pandas import Series,DataFrame #连接数据库 #mongo_url = f'mongodb://{username}:{password}@%{host}:{port}/{db}' client = pymongo.MongoClient('localh... 阅读全文
posted @ 2019-06-20 15:37 洋洋同学 阅读(595) 评论(0) 推荐(0) 编辑
摘要: Google Colab可直接从github打开Jupyter notebooks,只需将“http:// github.com/”替换为“https:// colab.research.google.com/github/”,就会直接加载到Colab中 。 via Google Colab开发团队 阅读全文
posted @ 2019-06-06 11:26 洋洋同学 阅读(1509) 评论(1) 推荐(0) 编辑
摘要: 本博文参考七月在线pytorch课程 1.numpy和pytorch实现梯度下降法 使用numpy实现简单神经网络 python import numpy as np N, D_in, H, D_out = 64, 1000, 100, 10 随机创建一些训练数据 x = np.random.ran 阅读全文
posted @ 2019-05-14 22:07 洋洋同学 阅读(1029) 评论(0) 推荐(0) 编辑