Fall, 2021
Here the idea is to take a cost function \(J\) and in a brute-force way, map out the entire cost landscape—that is, how \(J\) varies across a broad range of parameter values.
Assume that the cost function \(J\) is a function of a single parameter \(x\):
\[ J = x e^{(-x^{2})} + \frac{x^{2}}{20} \]
Assume values of \(x\) range between -10.0 and +10.0. Generate a plot of the cost function \(J\) over this range.
Use an optimization method of your choosing to find the value of \(x\) that minimizes \(J\).
Assume that the cost function \(J\) is a function of two parameters \(x\) and \(y\):
\[ J = x e^{(-x^{2}-y^{2})} + \frac{x^{2}+y^{2}}{20} \]
Assume values of \(x\) and \(y\) both range between -3.0 and +3.0. Generate a plot of the cost function \(J\) over this range.
Use an optimization method of your choosing to find the \((x,y)\) pair that minimizes \(J\).