Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Solve the Problem A&B as handwriting, C&D by MATLAB 1.5 [Bec14] Generate 50 points {(xi, yi), i = 1, 2, ..., 50} by MATLAB: randn
Solve the Problem A&B as handwriting, C&D by MATLAB
1.5 [Bec14] Generate 50 points {(xi, yi), i = 1, 2, ..., 50} by MATLAB: randn ('state', 26) x = linspace (0,1,50); y = 1.8*x.^2 - 2.7*x + 1 + 0.06*randn (size (x)); Find the quadratic function y=ax? +bx+c that best fits these points in the least squares sense. That is, the averaged L2-error of the prediction made by the optimized quadratic model is minimized. Specifically, do the following: (a) Formulate the problem at hand as an unconstrained optimization problem with respect to the model's parameters {a, b,c}, where the averaged L2-error of the quadratic prediction defined by 1 e 50 so (yperdiet y.)" with y predict = ax + bx +c is minimized. To earn credits, it is required that the problem is formulaed in the standard form as minimize f(w) W with both w and f(w) defined explicitly. (b) Deduce a closed-form solution for the problem from part (a). (c) Compute the averaged L2 error at the optimal solution. (d) Display the 50 data points together with the optimized quadratic function in a single figureStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started