linregressexample

docx

School

University of Missouri, Columbia *

*We aren’t endorsed by this school

Course

4540

Subject

Statistics

Date

Feb 20, 2024

Type

docx

Pages

3

Uploaded by ConstableDragon1573

Report
For the data below, do the following: PART I 1) Plot the data, along with three different hypothesis functions: h 1 ( x ) = 1.5 x h 2 ( x ) = 1.0 x h 3 ( x ) = 0.5 x 2) Plot the value of the cost function at these three values of θ 1 (1.5, 1.0, and 0.5). Which value of θ 1 gives you the minimal cost? x Y 1 1 2 3 3 2 4 3 5 6 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 0 1 2 3 4 5 6 7 x y
0.8 1 1.2 1.4 1.6 1.8 2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 theta1 J
3) Starting from θ 1 = 0.5 and using α = 0.01 (keep θ 0 = 0 ), compute two rounds of gradient descent for the problem above. At what value of θ 1 did you arrive? Is it closer or farther away from the true minimum? ___________________________________________________________________________ PART II Now use the more general (and better) hypothesis h θ ( x ) = θ 0 + θ 1 x Repeat the above example to determine both θ 0 and θ 1 The update rule above will need to consider both the parameters, as follows:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help