联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp

您当前位置:首页 >> cscs

日期:2021-04-19 11:29

Applied Modeling and Optimization

Exam 2

Answer all the questions clearly showing all the steps and assumptions. A maximum of 3 students per

group allowed. Do not discuss across groups. Upload all your answers (software code with basic

documentation, plots, numerical answers, etc.) on Canvas. Only one submission per group required.

Enjoy solving these problems!

1. Solve the following using steepest descent algorithm. Start with ????0 = [1 1]

???? and use stopping

threshold ∈= 10?6.

(a) Verify that the final solution satisfies the second order necessary conditions for a minimum.

(b) Plot the value of the objective function with respect to the number of iterations and

(c) Comment on the convergence speed of the algorithm.

2. Consider the problem: ???????????? ????(????) ????.????. ?(????) ≥ 0 where ????(????) = (????1 ? 1)2 + 2(????2 ? 2)2 and

?(????) = [1 ? ????1

2 ? ????2

2 , ????1 + ????2]

????.

(a) Plot the contour of f(x) and the feasible set on one single figure, i.e., overlay the feasible set

on the contour plot of f(x);

(b) Find a solution to the problem using the natural logarithmic barrier function, i.e., the barrier

function is -log(h1(????)) - log(h2(????)). Use initialization vector [0.5 0.5]T and the initial penalty

parameter equal to 1 and reduce it by ? in each iteration. Use a stopping threshold of 0.002;

(c) In a 2-D figure, plot the trajectory (i.e., the values connected by lines with arrows) of the

computed solution vector as the number of iteration progresses.

3. Collect the stock price for Tesla (NASDAQ: TSLA) for the past 30 days.

(a) Plot the data (date vs. stock price)

(b) Implement the stochastic gradient descent algorithm to fit a linear regression model for this

data set. Use any required open source libraries. Note that this specific algorithm was not

discussed in the class, but all the key ingredients have been covered. So, you must be able to

understand how this works.

(c) Plot the raw data and your linear regression model together for visual comparison.

(d) What does your model predict for Tesla’s stock price for the next three months into the

future?

(e) Explain the pros and cons of gradient descent and stochastic gradient descent.


版权所有:留学生程序网 2020 All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。