会员
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
有理想
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
15
下一页
2020年1月2日
动态规划 编辑距离问题(Edit Distance Problem)
摘要: 网址链接:https://algorithms.tutorialhorizon.com/dynamic-programming-edit-distance-problem/ 1. 目标:给定两个字符串s1, s2,写出一个算法来找出从s1转化到s2所需要的最小操作步骤数(编辑距离)。 所允许的操作:
阅读全文
posted @ 2020-01-02 22:14 RamboBai
阅读(808)
评论(0)
推荐(0)
2019年11月29日
“RuntimeError: Trying to backward through the graph a second time, but the buffers have already been freed. Specify retain_graph=True when calling backward the first time”
摘要: 当模型有多输出的时候,容易产生此问题,如以下程序所示: # zero the parameter gradients model.zero_grad() # forward + backward + optimize outputs, hidden = model(inputs, hidden) l
阅读全文
posted @ 2019-11-29 18:31 RamboBai
阅读(8300)
评论(0)
推荐(0)
2019年11月11日
PCA主成分分析 原理讲解 python代码实现
摘要: 本文参考自:https://github.com/apachecn/AiLearning/blob/master/src/py2.x/ml/13.PCA/pca.py https://github.com/lawlite19/MachineLearning_Python#%E5%85%ADpca%E
阅读全文
posted @ 2019-11-11 09:08 RamboBai
阅读(4000)
评论(1)
推荐(0)
2019年11月9日
卷积的理解 python代码实现 pytorch 多输入多输出通道的理解
摘要: 1.多输入通道 当输入数据含多个通道时,我们需要构造一个输入通道数与输入数据的通道数相同的卷积核。以1维卷积为例,卷积窗口大小为1*1,输入有三个通道,所以卷积的通道数也应该为3个通道。如下图所示,输入的数据有三个通道,卷积也有三个通道,每个通道都是一个1维的卷积核且卷积核的大小为11, 但是这样
阅读全文
posted @ 2019-11-09 20:45 RamboBai
阅读(4454)
评论(0)
推荐(0)
2019年11月8日
AdaBoost python代码实现
摘要: 本文参考自:(1)李航《统计学习与方法》 (2)https://github.com/apachecn/AiLearning/blob/master/src/py2.x/ml/7.AdaBoost/adaboost.py 提升方法(boosting)是一种常用的统计学习方法,在分类问题中,他通过改变
阅读全文
posted @ 2019-11-08 16:18 RamboBai
阅读(7331)
评论(2)
推荐(2)
2019年11月7日
随机森林 python实现
摘要: 本文转载自:https://github.com/apachecn/AiLearning/blob/e6ddd161f89f42d45fcee483b2292a8c7b2a9638/src/py2.x/ml/7.RandomForest/randomForest.py#L136 from rando
阅读全文
posted @ 2019-11-07 16:29 RamboBai
阅读(9032)
评论(2)
推荐(0)
2019年11月5日
朴素贝叶斯算法 python 实现
摘要: 转载自:https://github.com/apachecn/AiLearning/blob/master/docs/ml/4.%E6%9C%B4%E7%B4%A0%E8%B4%9D%E5%8F%B6%E6%96%AF.md 应用贝叶斯准则: 使用上面这些定义,可以定义贝叶斯分类准则为: 如果 P
阅读全文
posted @ 2019-11-05 14:11 RamboBai
阅读(1271)
评论(0)
推荐(0)
2019年11月4日
EM算法的python实现
摘要: 本文参考自:https://www.jianshu.com/p/154ee3354b59 和 李航博士的《统计学习方法》 1. 2. 创建观测结果数据 输出一下,观察一下结果: 结果: matrix([[0., 0., 1., 1., 1., 1., 0., 1., 0., 1.]]) 3. EM算
阅读全文
posted @ 2019-11-04 10:39 RamboBai
阅读(2575)
评论(0)
推荐(1)
2019年11月2日
K-Means K均值聚类 python代码实现
摘要: 本代码参考自: https://github.com/lawlite19/MachineLearning_Python/blob/master/K-Means/K-Menas.py 1. 初始化类中心,从样本中随机选取K个点作为初始的聚类中心点 2. 找出每个样本离哪一个类中心的距离最近,并返回 3
阅读全文
posted @ 2019-11-02 13:38 RamboBai
阅读(3759)
评论(0)
推荐(0)
2019年10月31日
决策树 ID3方法 python代码实现
摘要: 本代码来源自:https://github.com/Erikfather/Decision_tree-python 1.数据集描述 为了方便,我对数据集进行如下处理: 在编写代码之前,我们先对数据集进行属性标注。 (0)年龄:0代表青年,1代表中年,2代表老年; (1)有工作:0代表否,1代表是;
阅读全文
posted @ 2019-10-31 16:39 RamboBai
阅读(4311)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
15
下一页
公告