- Randomly initialize the weights.
- Implement forward propagation to get hθ(xi) for any xi.
- Implement the cost function.
- Implement backpropagation to compute partial derivatives of weights and biases.
- Use gradient descent to minimize the cost function with weights in θ.
I first learned neural network algorithm from a free online ML course series by Andrew Ng. Mr. Ng did a very great job on explaining every detail, and I had a general understanding of neural network. Nonetheless, I still tried to build neural network from scratch, and this exercise indeed helps me gain a much deeper comprehension of how different algorithms, such as backpropagation and gradient descent, come together to build a neural network.