﻿ 帮做C/C++编程|代写R语言编程|代做数据库SQL|代写R语言编程-代写留学生作业网

# 幫做C/C++編程|代寫R語言編程|代做數據庫SQL|代寫R語言編程

- 首頁 >> Database作業
Applied Modeling and Optimization
Exam 2
Answer all the questions clearly showing all the steps and assumptions. A maximum of 3 students per
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.

#### 在線客服  Essay_Cheery  