2019.6.22 Coursera Machine Learning 第一周 课程笔记

总结:

1.什么是机器学习?


 

"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."

Example: playing checkers.

E = the experience of playing many games of checkers

T = the task of playing checkers.

P = the probability that the program will win the next game.

https://mp.weixin.qq.com/s?__biz=MzIxMjE5MTE1Nw==&mid=2653190076&idx=1&sn=5ad9aab376fe9d6aa8d4092c1976aec0&chksm=8c990566bbee8c70fc9d354082cdc5ef4cf6a44dc3f448808f6b986de26b280fe8bdaae5a1f6&scene=21#wechat_redirect

2.监督学习

In supervised learning, we are given a data set and already know what our correct output should look like, having the idea that there is a relationship between the input and the output.
(数据集已经知道输出、找输入和输出之间的关系)

Supervised learning problems are categorized into "regression" and "classification" problems. 
(有监督学习分为回归和分类问题)
In a regression problem, we are trying to predict results within a continuous output, meaning that we are trying to map input variables to some continuous function.
(连续值)
 In a classification problem, we are instead trying to predict results in a discrete output. In other words, we are trying to map input variables into discrete categories.
(离散值)

3. 无监督学习

Unsupervised learning allows us to approach problems with little or no idea what our results should look like. We can derive structure from data where we don't necessarily know the effect of the variables.
(只有一个数据集(无区别的数据集)、能在其中找到某种结构吗?)

We can derive this structure by clustering the data based on relationships among the variables in the data.
(对数据进行聚类,从而得出这种结构。常用聚类算法)

With unsupervised learning there is no feedback based on the prediction results.
(在无监督学习中,没有基于预测结果的反馈???)

4.单变量线性回归模型 

Model Representation:模型表示

例子:预测房子价格(监督、回归)

了解常用的符号:

m:训练样本数目

x:输入变量/特征

y:输出变量/目标变量

(x,y)表示一个训练样本

:表示第i个训练样本

h:hypothesis,假设,表示一个函数,从x到y的映射。

关键是,如何得到h?

h可分为线性回归模型、非线性回归模型。这里更简单,是一个单变量回归模型。

5.代价函数(平方误差函数):用于解决大多数回归问题

Cost Function:代价函数

我们怎样选择θ,使得建设函数表示的直线尽量与我们的数据拟合?

使用以上代价函数,使得结果最小,也就最拟合

不同的对应不同的假设函数、代价函数。我们的目标是找出,使代价函数最小值。这里=1.

不是0时,代价函数变成了一个三维曲面,分别为两个坐标轴,依旧是找三维曲面取最小值的两个

我们不使用三维图像,用轮廓图来代替

contour plot/figure:轮廓图

6.梯度下降

我们设置一个初始点,在这个点,旋转360度,先找一个方向,一步一步下来,得到一个局部最小值。

回到初始点,再选择一个不同的方向,一步一步下来,得到另一个局部最小值。

我们引入梯度下降算法:

Gradient Descent:梯度下降

:一个数字、表示学习速率、例子中表示决定下山的步子大小,如何设置以后会说

一定要同时更新!!!

不能太小,也不能太大

:意义在于逼近最小值点的方向是对的

 

问题:,导数为0,所以不会变,依旧能找到最低点!!

凸函数:

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值