Linear Regression

Given a dataset of 40 items attached (Data_assignment1.csv bellow), where the left column is the independent variable (x) and the right column is the dependent variable (y). Question 1 (5 mark)Use the gradient descent method to fit a linear regression function (i.e., f(x)=?0+?1×1) to the data, where the learning rate is set to 0.01, and the number of iterations is 10,000. Here you need to report the estimated function (i.e., ?0 and ?1 ) and its corresponding mean squared error on the dataset.Question 2 (5 marks)Use the gradient descent method to fit a 3-order polynomial regression function (i.e., f(x)=?0+?1x+?2×2+?3×3) to the data. You are free to choose learning rate and the number of iterations as long as it achieves a reasonable fit. Here you need to report the estimated function and its corresponding mean squared error, along with the learning rate and the number of iterations you used.Question 3 (15 marks)Let us say that you want to select a model based on the dataset for prediction of new data in future. Answer the two questions below.3.1 (10 marks) Which model (from linear to 5-order polynomial) is the fittest for the dataset? Here you need to give steps of your model selection procedure.3.2 (5 marks) What is your predicted regression function. Here you need to explain briefly how you estimate the function after the model is determined, and to report the estimated function and its corresponding mean squared error, along with the learning rate and the number of iterations you used.You may refer to the following Python code on dividing a dataset into folds for the k-folder cross validation.——————————————————————————–np.random.shuffle(data)  # Shuffle all rowsfolds = np.array_split(data, k)  # split the data into k foldsfor i in range(k): x_cv = folds[i][:, 0]  # Set ith fold for testing y_cv = folds[i][:, 1] new_folds = np.row_stack(np.delete(folds, i, 0)) # Remove ith fold for training x_train = new_folds[:, 0]  # Set the remaining folds for trainingy_train = new_folds[:, 1]

Struggling to find relevant content? Order a custom essay on
Linear Regression
Let our experts save you the hassle
Order Now
Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
Sign up, place your order, and leave the rest to our professional paper writers in less than 2 minutes.
step 1
Upload assignment instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
s
Get personalized services with GPA Fix
One writer for all your papers
You can select one writer for all your papers. This option enhances the consistency in the quality of your assignments. Select your preferred writer from the list of writers who have handledf your previous assignments
Same paper from different writers
Are you ordering the same assignment for a friend? You can get the same paper from different writers. The goal is to produce 100% unique and original papers
Copy of sources used
Our homework writers will provide you with copies of sources used on your request. Just add the option when plaing your order
What our partners say about us
We appreciate every review and are always looking for ways to grow. See what other students think about our do my paper service.
IT, Web
Great job on the paper!!
Customer 452885, January 30th, 2023
Human Resources Management (HRM)
Thanks.
Customer 452701, August 1st, 2023
Literature
Thank you , this is perfect !
Customer 452795, May 15th, 2022
Nursing
Thank you to the writer and also thank you to the support team I got an A for the paper
Customer 452635, June 17th, 2022
Education
Thank you so much
Customer 452631, October 5th, 2021
Nursing
Thank you for a great paper.
Customer 452707, August 6th, 2022
Business and administrative studies
Thanks
Customer 452701, August 16th, 2022
Management
Comprehensively done. Thank you
Customer 452583, July 20th, 2021
Finance
Thank You
Customer 452643, October 24th, 2021
Nursing
All points covered perfectly! Great price!
Customer 452707, March 12th, 2023
Social Work and Human Services
Excellent!
Customer 452587, August 3rd, 2021
Nursing
Great! Thanks again!
Customer 452707, July 4th, 2022
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat

Good News ! We now help with PROCTORED EXAM. Chat with a support agent for more information