Root finding and OptimizationRoot findingRoot finding is the process of finding the x for a function h(x), so that h(x) == 0.
OptimizationOptimization: for a function f(x) we are looking for xm such that f(xm) is minimal (locally or globally). You may want to read section 14.7 Optimisation in the lecture notes for a brief introduction to function optimisation using fmin. The program dips.py can create the following contour plot of a function f(x,y) (pdf, png):
and can use scipy.optimize.fmin to find a minimum:
Optimization terminated successfully.
Current function value: -0.310155
Iterations: 63
Function evaluations: 116
[-2.13332808 0.53330643]
The minimum fmin finds a local minimum at (x,y) = (-2.13332808,0.53330643) with a function value (f(x,y)=-0.310155. Exercise
There is nothing to submit for this lab. |
|