what is back propagation?
it’s gradient decent just with a different form.
Metaphor : divide features into layers, use different combination via weights to mimic the polynomial features.
calculate the gradient of the loss function respect to each weight by chain rule, consist of previous input layer and loss of output in next layer,one layer at a time,
why we need back propagation?
Non-linear classification need to include lots of features. using back propagation can calculate gradient more quickly (dynamic programming).
how to ?
1.randomly initialize the weights
2.implement forward propagation to get
3.implement the cost function (K classification) with regulation
sum up the cost in multiple class of every training data
4.calculate output layer error, which is a-y
5.based on the output layer error , adjust weight on every layer.
6.back to 2