Intro
what is machine learning
- 让机器具备找一个函数的能力
- 语音识别
输入:声音信号
输出:文字
这个函数很复杂,人类无法编写出,让机器自己找到这个函数的过程便是机器学习
- 图像识别
- 阿尔法狗
- 语音识别
different types of function
regression:输出为数值(scalar)classification:分类(classes)structured learning:创造
training
含参函数
$y = b + wx_1$ ->
Model->Linear$x,y$ ->
feature$w$ ->
weight$b$ ->
biasLoss
$L(b, w)$ 来自于训练集
$x_1$ -> $0.5k + 1x_1 = y$ -> $\widehat{y}$ ->
label$e_1 = |y - \widehat{y}| …$ ->
Loss: $L = \frac{1}{N}\sum_{n}^N e_n$$e = |y - \widehat{y}|$ ->
MAE$e = (y - \widehat{y})^2$ ->
MSEIf $y$ and $\widehat{y}$ are bath probability distributions ->
Cross-entropyerror surfaceoptimization
$w^, b^ = arg \min_{w, b}{L}$
gradient descent- 随机选取 $w^0$
- 计算 $w$ 对 $L$ 的微分在$w^0$处的值
- 斜率为负,增加 $w$ ;斜率为正,减小 $w$
- 增大和减小的数值根据
斜率和学习率来决定hyperparameters - $w^0$ -> $w^1$ -> …
- 更新次数/$w^tt = 0$ 停止
global minimalocal minima
evaluation