Andrew Ng机器学习笔记1

Introduction


1. What is Machine Learning:
1). Field of study that gives computers the ability to learn without being explicitly programmed.
2). A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E.



2. Supervised Learning VS Unsupervised Learning
监督学习和非监督学习之间最本质的区别就是训练数据是否有标签,有标签就是监督学习,否则称为非监督学习,也称为聚类(clustering)


3. Regression VS Classfication
回归问题是连续数据上的模型构建问题,例如房价与面积的关系;分类问题是离散数据上的问题,例如是否恶性肿瘤与肿瘤大小的关系。


Model and Cost Function
1. a function h: X->Y so that h(x) is a "good" predictor for the corresponding value of y. We call function h a hypothesis. 这里使用的是线性回归。
2. Cost function is introduced to mesure the accuracy of the hypothesis function. 最常用的是"Squared error function"。
3. 通过选取符合的model function并通过找到一个最小的cost function, 来得到model function中的各个参数大小,从而建立机器学习模型。





Gradient descent
Gradient descent is a method for finding the minimum of a cost function.
多参数必须做到同时更新。如果非同时更新,可能结果也对所以不会注意到,但是会有微小的不同。
如果学习率太小,下降的慢,迭代次数多。
如果太大,可能无法收敛甚至发散(一步太大)。
容易达到局部最低点(和初始值有关),此时导数为0,会停止下降。当接近最低点时,步长会自动变小,因此没有必要减少学习率,固定即可。
由于线性回归的代价函数都是凸函数(碗形),因此用梯度下降法都能得到全局最优。


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值