Question
In this assignment you will implement the linear regression algorithm( in c++) and apply it to analyze attached data. Implement the linear regression solution Theta^=(X
In this assignment you will implement the linear regression algorithm( in c++) and apply it to analyze attached data.
Implement the linear regression solution Theta^=(XTX)-1XTY as discussed in the class and evaluate the residual-sum-of-squares RSS of that solution Theta^.
In the attached zip file you will find 4 datasets saved in text format:
dataX is the feature matrix X saved as a comma-separated table (a csv file). The matrix has dimension 100x100. Each row is one data point with p=100 feature values Xi. A total of n=100 data points included.
dataY is the response vector Y saved as a column table (also csv file). This vector has dimension 100x1 - one response for each data point.
You do not need dataX1 and dataY1 for this assignment.
For this assignment, use only the first 10 columns from dataX to fit dataY. That is, your linear model Theta^ should be 10-element vector connecting X1..10 to Y.
For submission include: (1) the source code of your program; (2) the weight-vector Theta^ that you found; (3) and the RSS of that Theta^. I have dataX,dataY,dataX1 and dataY1.Can anyone show me how can i handle this question ?
Step 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