Question: Given Xw = y where X = 1 1 4 2 6 4 3 - 6 and y = 31 2 5 4 which
Given Xw = y where X = 1 1 4 2 6 4 3 - 6 and y = 31 2 5 4 which constitute an exemplary problem. Write a Python routine LO 10] to find the approximated solution w for this over-determined system given arbitrary X = R5 and y = R5*1. Submit your Python codes as a function routine ("def A1_MatricNumber(X,y)") that takes in X and y as inputs and generate (XTX)- and w as outputs in a single file with filename "A1_StudentMatriculation Number.py". Your Python routine should return one matrix (XTX)-1 and the least squares solution vector w (as numpy array). Hint: you will need "import numpy as np" and its matrix manipulation functions.
Step by Step Solution
3.41 Rating (151 Votes )
There are 3 Steps involved in it
The objective of the question is to write a Python routine to find the least squares sol... View full answer
Get step-by-step solutions from verified subject matter experts
