User:Sajeewasp

A computational example for finding the local minimum using the Steepest Descent method. This code has been published by me on the page for Gradient Descent method.

The above piece of code gives the value of 2.25 with a very high precision. It converges very fast because of the adaptive step size. The step size gets scaled down by a factor of 10 on each cycle of the do-while loop until it achieves the criteria which makes sure that the step along that direction really "minimizes" the function. The variable dis1 starts from a value of 6 and decreases to 2.25 in about 1 second(71 cycles).

Sajeewa Pemasinghe (Walimuni Dewage) - Wayne State University