A Beginners Guide to the Gradient Descent Algorithm