In order to make the gradient decent faster ,we can use this formular . 


Andrew Ng

After updating the xi ,we could use gradient decent faster. 

NOTICE : If we want to predict some other values , the input use the above normalization method.

In order to know whether our gradient decent is working or not. We can plot the cost function and interation is the x axis. every iteration should lead to the cost function going down. If it doesn't go down, maybe the alpha(For error square cost function) is too big .