Question: 3 . 1 ( 1 0 points ) For the matrix A and vector y given below, compute the following: Transpose of A ( please

3.1(10 points)
For the matrix A and vector y given below, compute the following:
Transpose of A (please name it AT)
Matrix product of AT by A (please name it ATA)
Determinant of ATA (checking that det(ATA)0 indicates that ATA is an invertible matrix)
Inverse of ATA (please name it ATAi)
Product of AT by y (please name it ATy)
Product of ATAi by ATy (please name it x)
Print the value of x
3.2(5 points) Apply the np.linalg.lstsq method to find the least-squares solution to the linear matrix equation A.x = y. Print the value of x found with this method to confirm that it is the same as the one found by explicit calculation in 3.1.
3.3(5 points) For the matrix B of new observations given below, use the value of the coefficient vector x found in 3.1 and 3.2 to predict the value of y^ according to the linear regression model

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!