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

ref : https://www.youtube.com/watch?v=ibJpTrp5mcE&list=PLZ9Enh6e3wIk9CkY7b-oqz8P-VIjLUU1h&index=5&t=0s