吴恩达笔记--class 1
-
- classification
- CNN: image data
- RNN: one-dimension sequence data, just like: language
- data
- structured data: data from database; the feathers are clearly defined
- unstructured data: audio or images, the text in the picture, things that computer understand more hard.
- binary classification 二分分类
- yes or not
- 1 or 0
- logistic 回归
- sigmoid(z)
- 由于y-hat ∈[0,1], so y-hat 的取值加上sigmoid函数
- separate w and b
- 回归损失函数--loss(error) function
- loss function
- cost function
- 优缺点:
- 优点
- 缺点
- sigmoid(z)
- gradient descent 梯度下降法
- want to find w,b that minimize J(w,b)
- logistic 回归中的梯度下降法
- y-hat==a~output
- m个样本的梯度下降
- d w1~累加器
- vectorization 向量化显示
- 为了避免显示的循环 for loop--more and more data but less time
- np.dot()向量点积
- whenever possible, avoid explicit for-loops
- 向量化logistic 回归
- 两行代码便可以完成--正向
- 同时计算梯度输出
- details
- python~broadcasting
- eg: 计算营养百分比情况
- reshape函数用于确保矩阵的尺寸
- 区别列向量和行向量与秩为1 的数组
- 为了避免显示的循环 for loop--more and more data but less time
- neural network
- input layer ~ hidden layer(don't see in training set) ~ output layer
- w1~(4,3):3个输入,4个输出; w2~(1,4):4个输入,1个输出
- how to calculate
- 单个训练样本:
- 多个训练样本:(P28)
- activation function
-
- sigmoid(x)【二分类的输出层】
- tanh(x)
- ReLU: a=MAX(0,a) [almost] 修正
- why? 如果都是线性激活函数的话,多层的隐藏层就没有意义,得到的永远是线性结果,所以要引入非线性激活函数。
- slope ,derivatives 导数
- sigmoid
- tanh
- ReLU or l
-
- gradient descent for neural networks
- 正向和反向
- 反向理解
- random initialization
- if use sigmoid(z) ~~weigh *0.01 希望weigh会小一些
- 正向和反向
- classification