在机器学习中,监督式学习(Supervised Learning)通过定义一个模型,并根据训练集上的数据估计最优参数。梯度下降法(Gradient Descent)是一个广泛被用来最小化模型误差的参数优化算法。梯度下降法通过多次迭代,并在每一步中最小化成本函数(cost function)来估计模型 ...
分类:
编程语言 时间:
2017-01-03 13:01:15
阅读次数:
1420
Remember the story of Little Match Girl? By now, you know exactly what matchsticks the little match girl has, please find out a way you can make one s ...
分类:
其他好文 时间:
2016-12-30 23:18:54
阅读次数:
255
题意:n个平行于坐标轴的正方形,求出最远点对的平方 题解:首先求出凸包,可以证明最远点对一定是凸包上的点对,接着可以证明最远点对(每个点的对踵点)一定只有3*n/2对 接着使用旋转卡壳找到最远点对,但是白书上的算法过于麻烦 所以我看到一个简单想法就是: 可以直接枚举每个点,接着枚举这个点对应最远的点 ...
分类:
其他好文 时间:
2016-12-29 22:48:38
阅读次数:
169
Given a positive integer num, write a function which returns True if num is a perfect square else False. Note: Do not use any built-in library functio ...
分类:
其他好文 时间:
2016-12-28 07:49:10
阅读次数:
181
知道这个库已经很长的时间了,一直没有实践,以前也看过svm的理论,今天开始安装一下一直感觉有错误,结果自己傻了,根本没有错,可以直接使用。。。 libsvm参考资料: libsvm下载网址:http://www.csie.ntu.edu.tw/~cjlin/libsvm/ 我的系统环境为 Win7 ...
分类:
其他好文 时间:
2016-12-23 22:47:57
阅读次数:
444
My binary encoding method gives a 8 for the first problem, however, there is a smarter method that generates a answer of 5, which can be found here: h ...
分类:
其他好文 时间:
2016-12-23 11:43:24
阅读次数:
241
K-L变换( Karhunen-Loeve Transform)是建立在统计特性基础上的一种变换,有的文献也称为霍特林(Hotelling)变换,因他在1933年最先给出将离散信号变换成一串不相关系数的方法。K-L变换的突出优点是去相关性好,是均方误差(MSE,Mean Square Error)意 ...
分类:
其他好文 时间:
2016-12-23 01:40:23
阅读次数:
260
Retrofit是Square公司发布的一个可以应用在Android和Java中的Http客户端访问框架,其底层应用的是OkHttp。 在这个帖子中,我们以下面这个Http请求为例: 其请求结果(JSON)如下所示: 接下来我们从Retrofit的用法到原理,来介绍一下这个框架。 一、Retrofi ...
分类:
移动开发 时间:
2016-12-22 14:56:54
阅读次数:
289
DFS, my solution is to fill each edge of the square one by one. DFS to construct the 1st, then 2nd, then 3rd, then 4th. For each edge I scan all the m ...
分类:
其他好文 时间:
2016-12-21 09:27:44
阅读次数:
194