随笔分类 -  Python

摘要:I had been searching for so long on google for solutions to visualize a high dimensional decision boundaries, but it seems no so many people having do 阅读全文
posted @ 2020-03-17 10:11 Junfei_Wang 阅读(286) 评论(0) 推荐(0)
摘要:We are now trying to deploy our Deep Learning model onto Google Cloud. It is required to use Google Function to trigger the Deep Learning predictions. 阅读全文
posted @ 2019-06-04 23:44 Junfei_Wang 阅读(433) 评论(0) 推荐(0)
摘要:本文解决python中比较令人困惑的一个小问题:传递到函数中的参数若在函数中进行了重新赋值,对于函数外的原变量有何影响。看一个小栗子: 请问程序执行后,a=1还是2?并解释原因。 实际上,这个问题有两个比较tricky的地方: 1. python的变量是没有类型的,类型属于对象。也就是说当我们操作x 阅读全文
posted @ 2018-09-23 09:33 Junfei_Wang 阅读(532) 评论(0) 推荐(0)
摘要:最初对于牛顿法,我本人是一脸懵的。其基本原理来源于高中知识。在如下图所示的曲线,我们需要求的是f(x)=0的解: 对于懵的原因,是忘记了高中所学的点斜式(Point Slope Form),直接贴一张高中数学讲义: 因为我们一路沿着x轴去寻找解,所以迭代求f(x)=0的解得通用式为: 与梯度下降相比 阅读全文
posted @ 2018-01-24 21:58 Junfei_Wang 阅读(8880) 评论(0) 推荐(0)
摘要:读取csv的代码: 读取不规则csv到pandas 阅读全文
posted @ 2018-01-22 09:36 Junfei_Wang 阅读(14970) 评论(0) 推荐(0)
摘要:DataFrame的创建 DataFrame内容读取与改变 Other Methods to define 阅读全文
posted @ 2018-01-21 10:16 Junfei_Wang 阅读(575) 评论(0) 推荐(0)
摘要:给Series赋值index和values 将乱序索引的两个Series根据索引相加 Series name and index name 阅读全文
posted @ 2018-01-21 09:18 Junfei_Wang 阅读(612) 评论(0) 推荐(0)
摘要:Python Numpy线性代数函数操作 1、使用dot计算矩阵乘法 2、获得方阵的对角线元素,计算方阵的迹,计算方阵的行列式 3、矩阵的转置,生成单位矩阵 阅读全文
posted @ 2018-01-04 08:07 Junfei_Wang 阅读(744) 评论(0) 推荐(0)
摘要:1、开方与求e指数 2、条件Merge 3、Statistic functions 4、布尔函数 5、排序函数 6、包含操作 7、测试两个数组内各个元素元素的包含关系 阅读全文
posted @ 2018-01-02 06:18 Junfei_Wang 阅读(811) 评论(0) 推荐(0)
摘要:NumPy的操作介绍 阅读全文
posted @ 2017-12-31 05:46 Junfei_Wang 阅读(792) 评论(0) 推荐(0)
摘要:Python日期操作: python中时间日期格式化符号: %y 两位数的年份表示(00-99) %Y 四位数的年份表示(000-9999) %m 月份(01-12) %d 月内中的一天(0-31) %H 24小时制小时数(0-23) %I 12小时制小时数(01-12) %M 分钟数(00=59) 阅读全文
posted @ 2017-12-31 04:32 Junfei_Wang 阅读(207) 评论(0) 推荐(0)
摘要:字符串操作练习: 阅读全文
posted @ 2017-12-31 04:10 Junfei_Wang 阅读(201) 评论(0) 推荐(0)
摘要:1、Python+Eclipse安装、配置: http://www.cnblogs.com/rhyswang/p/8087752.html 2、数学运算及math库: http://www.cnblogs.com/rhyswang/p/8133751.html 3、Python List列表操作: 阅读全文
posted @ 2017-12-30 03:23 Junfei_Wang 阅读(213) 评论(0) 推荐(0)
摘要:Tuple的特性在于,它的元素是不可变的(immutable),一旦设定,就不能使用索引去修改。 阅读全文
posted @ 2017-12-30 03:08 Junfei_Wang 阅读(8067) 评论(0) 推荐(1)
摘要:Python中List的N种操作,其简单程度令人叹为观止... 续: 阅读全文
posted @ 2017-12-29 04:41 Junfei_Wang 阅读(1188) 评论(0) 推荐(0)
摘要:1、数字类型分为int、float和complex,complex暂时用不到,int和float的相关运算和类型转换如下: 2、常量: 3、数学函数: 阅读全文
posted @ 2017-12-28 06:06 Junfei_Wang 阅读(638) 评论(0) 推荐(0)
摘要:import random number = int(random.uniform(1,10)) attempt = 0 while (attempt < 3): m = int(input('Please try to guess the number!')) if m == number: print('bingo!') break e... 阅读全文
posted @ 2017-12-23 23:02 Junfei_Wang 阅读(642) 评论(0) 推荐(0)
摘要:__init__,构造函数 使用缩进来控制代码块,判断不加括号,加问号 语法练习: 问题: 单下划线_aa,与双下划线__aa的区别? 阅读全文
posted @ 2017-12-23 11:15 Junfei_Wang 阅读(186) 评论(0) 推荐(0)