Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this Assignment, you are asked to implement a linear regression model using the gradient descent method from scratch using your preferred language (e.g., Java,

In this Assignment, you are asked to implement a linear regression model using the gradient descent method from scratch using your preferred language (e.g., Java, Python).

1. Create a data set of 100 records where each record has two values, and . The values range from 1 to 100 and is defined as follows = 2 + , where is a real random number between 5 and 5.

2. Plot your data set.

3. Implement linear regression using the gradient descent method (using 100 iterations) in your preferred language and test it using 3 values of the step size variable, , (i.e. 0.0001, 0.001, 0.1). Which value yields the best performance as measured by the cost/loss function, ()?

4. Plot the evolution of the () vs. number of iterations.

5. Plot your data set with fitted line generated by your linear regression model.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

How To Make A Database In Historical Studies

Authors: Tiago Luis Gil

1st Edition

3030782409, 978-3030782405

More Books

Students also viewed these Databases questions