Consider the following training set of m=4 training examples: question 2 – Machine Learning Week 1 Quiz 2

Consider the following training set of m=4 training examples:

xy
10.5
21
42
00

Consider the linear regression model hθ(x)=θ01x. What are the values of θ0 and θ1 that you would expect to obtain upon running gradient descent on this model? (Linear regression will be able to fit this data perfectly.)

  • θ0=0.5,θ1=0
  • θ0=0.5,θ1=0.5
  • θ0=1,θ1=0.5
  • θ0=0,θ1=0.5
  • θ0=1,θ1=1

Answer:
θ0=0,θ1=0.5

As J(θ01)=0, y = hθ(x) = θ0 + θ1x. Using any two values in the table, solve for θ0, θ1.

Leave a Comment

Your email address will not be published. Required fields are marked *