Cost Function and Backpropagation
Tags: backpropagation, coursera-machine-learning, neural-networks
Cost Function : article
Neural Network (Classification)
L, sl, K:
- L = total number of layers in the network
- sl = number of units (not counting bias unit) in layer l
- K = number of output units/classes
EX:
- L: 總共的 layer 數
L = 4
- Sl: 每一 layer 上的 unit(Neuron) 數
s1 = 3, s2 = 5, s4 = sL = 4
Binbary classification & Multi-class classification (K classes)
Binary classification | Multi-class classification (K classes) |
y = 0 or 1 | y = ℝ^K |
1 output unit | K output units |
sL = 1 (K = 1) | sL = k (k ≥ 3) |
- 當 K 超過2種以上就要用 Multi-calss classification
Cost function
-
Logistic regression:
-
Neural network: