首页 新闻 聚焦 科技 财经 创业 综合 图片 视频

IT界

旗下栏目: 行业 生态 IT界 创新

MECH203程序代做、代写Python程序

来源:珠穆朗玛网 发布时间:2020-02-10

MECH203作业代做、代写Python程序设计作业、代做Java,c++语言作业
MECH203 – Mathematical and Computational Tools for Mechanical Engineers II
MECH 203
Jupyter Notebook Assignment
Optimization
PART 2 – Unconstrained optimization
Let’s practice our coding skills and check if we have a good handle on the basics of local optimization!
We’ll do this by writing our own steepest descent solver.
Section A- Find the minimum of the following function:

will illustrate that the method is following the gradient. It’s OK
if you don’t, you can plot in any way that makes sense to you;
but it makes for a cool plot. The advantage of the log is that it
makes the x**4 function increase in value less quickly, which facilitates plotting. Note
that this example is incomplete: you should insert better labels and legends.)
4) Instead of using your own method, use the CG and BFGS algorithms available in the
SciPy.optimize.minimize module. (tip: you can input the analytical gradient that you
implemented above using “jac=”; this will make the calculation much more efficient than having
the computer perform numerical derivatives.) Use x0 = 10, y0 = 20 as starting points. (6 marks)
5) Which method provided the best results, in your opinion? Explain your reasoning (2 marks)
Section B- Minimize the following function instead:
1) Define the function and its analytical gradient in Jupyter notebook. ( 2 marks)
2) Implement a steepest gradient algorithm. Use x0 = 2, y0 = 20 as starting points. You can consider
that the algorithm has converged to a solution if f(x,y) is within 0.0001 of its optimal value. (4
marks).
3) BONUS (2 marks): Plot the value of f(x,y), x, and y. For example:
MECH203 – Mathematical and Computational Tools for Mechanical Engineers II
(you should insert better labels and legends.)
4) Use the CG and BFGS algorithms available in the SciPy.optimize.minimize module. Use x0 = 2,
y0 = 20 as starting points. (4 marks).
5) How many minima does this function have? (2 marks)
6) Can the computer find them all? (2 marks)
7) Are they local or global? (2 marks)
Section C- Explain in about half-a-page (400 words) how the CG and BFGS algorithms
function. Feel free to use equations and graphs. (4 marks)

如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp

责任编辑:珠穆朗玛网

最火资讯