Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab Description In this lab we will use least squares to fit linear data. We will use three different methods for the least squares fitting,

image text in transcribed

image text in transcribed

image text in transcribed

Lab Description In this lab we will use least squares to fit linear data. We will use three different methods for the least squares fitting, after setting up the overdetermined system Xm - y, will ind the best fit m by: 1. Solving the normal equations XTXm XTy using the Moore-Penrose pseudo inverse (SVD) 2. Minimizing the objective function/(m) = 1Xm-yl. using gradient descent 3. Minimizing the above objective function with the additional constraint lImll S 1 using both of the above methods with Lagrange multipliers This will allow us to write a model y mr + b where (m. b) = m is the least squares solution of the system Xm-y. We will plot the line obtained with the different methods, observe how well each line fits the data, and compare the esults obtained with the different methods and their computational cost (CPu times). Data: We'll use some made up data for this exercise. Preliminaries 1. Create a directory named Lab2 in your file system and save this document there 2. Create a (sub)directory within the above named data 3. Download the data for this assignment and save it to the data (sub)directory You should now be ready to work on the assignment Lab Description In this lab we will use least squares to fit linear data. We will use three different methods for the least squares fitting, after setting up the overdetermined system Xm - y, will ind the best fit m by: 1. Solving the normal equations XTXm XTy using the Moore-Penrose pseudo inverse (SVD) 2. Minimizing the objective function/(m) = 1Xm-yl. using gradient descent 3. Minimizing the above objective function with the additional constraint lImll S 1 using both of the above methods with Lagrange multipliers This will allow us to write a model y mr + b where (m. b) = m is the least squares solution of the system Xm-y. We will plot the line obtained with the different methods, observe how well each line fits the data, and compare the esults obtained with the different methods and their computational cost (CPu times). Data: We'll use some made up data for this exercise. Preliminaries 1. Create a directory named Lab2 in your file system and save this document there 2. Create a (sub)directory within the above named data 3. Download the data for this assignment and save it to the data (sub)directory You should now be ready to work on the assignment

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

Explain the different types of marketing strategies.

Answered: 1 week ago