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.
Social Work and Human Services
Great Work!
Customer 452587, October 13th, 2021
Nursing
Not all sources were " American sources" as directed
Customer 452615, September 16th, 2021
Business and administrative studies
Perfect as always!
Customer 452909, April 15th, 2023
Nursing
Great writing! Really appreciate your help!
Customer 452503, April 22nd, 2021
Other
GOOD
Customer 452813, July 5th, 2022
Human Resources Management (HRM)
Thank you very much.
Customer 452701, September 10th, 2023
Nursing
Writer did an excellent job! Thank you.
Customer 452693, January 14th, 2022
IT, Web
Excellent job on the paper.
Customer 452885, January 25th, 2023
Finance
Thank You
Customer 452643, October 24th, 2021
Nursing
Top notch quality!
Customer 452453, February 16th, 2023
Other
GREAT
Customer 452813, July 3rd, 2022
Other
Awesome Work!
Customer 452587, February 24th, 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