这一讲主要是针对单变量的线性回归来讲两个基本概念:损失函数(cost function)、梯度下降(Gradient Descent)1 Cost Function
定义如下:
左图为cost function的定义。右边为只有一个参数的h(x)的情况。
cost function的作用的评价一个回归函数好坏用的,具体来说就是评价回归函数h(x)的参数选对没。
这里J(theta)也可以...
分类:
其他好文 时间:
2015-08-08 16:42:04
阅读次数:
142
Given an integer array of sizen, find all elements that appear more than? n/3 ?times. The algorithm should run in linear time and in O(1) space.public...
分类:
其他好文 时间:
2015-08-08 16:23:35
阅读次数:
106
参考地址:http://www.w3cplus.com/css3/new-css3-linear-gradient.htmlbackground-image: linear-gradient(to bottom, //渐变方向#d9edf7 //开始颜色0px, ...
分类:
Web程序 时间:
2015-08-08 10:29:44
阅读次数:
111
很多ML模型用的都是数值特征,那么对于分类特征,该怎么做呢? 以linear network为例:先对特征进行转换,转换成有意义的特征后,再对其进行线性组合 进一步,模型可表示为:使Ein最小,我们就能知道如何转换特征,如何组合线性模型。 以给电影打分为例,我们实际上要做的,就是...
分类:
其他好文 时间:
2015-08-07 17:57:04
阅读次数:
453
页面间切换(transition)用如下标记#+REVEAL_TRANS: cube可选的还有几个:default, cube, page, concave, zoom, linear, fade, none我比较喜欢cube,效果如下:...
分类:
其他好文 时间:
2015-08-07 00:28:09
阅读次数:
192
Given an integer array of sizen, find all elements that appear more than? n/3 ?times. The algorithm should run in linear time and in O(1) space.解法:参考编...
分类:
其他好文 时间:
2015-08-06 23:52:02
阅读次数:
201
因为要用svm做regression,所以看了一些关于libsvm,总结以备用
libsvm在训练model的时候,有如下参数要设置,当然有默认的参数,但是在具体应用方面效果会大大折扣。
Options:可用的选项即表示的涵义如下
-s svm类型:SVM设置类型(默认0)
0 -- C-SVC
1 --v-SVC
2 – 一类SVM
3 -- e -SV...
分类:
其他好文 时间:
2015-08-06 22:31:13
阅读次数:
198
本笔记为吴恩达机器学习在线课程笔记,课程网址(https://www.coursera.org/learn/machine-learning/)2.1 模型表示参考视频: 2 - 1 - Model Representation (8 min).mkv 本课程讲解的第一个算法为"回归算法",本节将要...
分类:
其他好文 时间:
2015-08-06 20:16:29
阅读次数:
227
Given an integer array of size n,
find all elements that appear more than ? n/3 ? times.
The algorithm should run in linear time and in O(1) space.
此题是Majority Element的继续,关于此题可以移步至Majority
Elem...
分类:
其他好文 时间:
2015-08-06 13:28:19
阅读次数:
104
特征空间映射1. 问题
简单的0,1分类 – 即标签y=y = {0,10,1}
特征值:x=[x1,x2]x = [x_1, x_2]二维
数据离散点如图:
2.解答
数据是二维的,因此如果利用Logistics Regression 的到的θ\theta只有三个数,所以分类超平面是二维坐标下的直线
由数据分布图可以知道分类超平面应该是一个二次曲线,所以这里利用多项式核函数:K=(...
分类:
其他好文 时间:
2015-08-06 13:21:08
阅读次数:
187